What are two ways for mysql to insert a record?
Today, the editor will share with you the relevant knowledge of what the two ways of inserting records in mysql are. The content is detailed and the logic is clear. I believe most people still know too much about this knowledge, so share this article for your reference. I hope you can get something after reading this article. Let's take a look.
1. Insert the specified column. If this column is not listed, automatically assign a value to null. If you do not insert a column and set a non-null constraint, an error will be reported.
2. Insert all columns. If any column does not want to insert a value, it needs to be assigned a value of null.
Example
Insert into table name: values (value, value....); eg:insert into product values (null,' Apple computer', 18000.0Mae 10); insert into product values (null,' Huawei 5G Mobile', 3000Mae 20); insert into product values (null,' Xiaomi Mobile', 1800Mae 30); insert into product values (null,'iPhonex',8000,10); insert into product values (null,'iPhone7',6000200); insert into product values (null,'iPhone6s',4000,1000) Insert into product values (null,'iPhone6',3500100); insert into product values (null,'iPhone5s',3000100); insert into product values (null,' Instant Noodles', 4.5 Magazine 1000); insert into product values (null,' Coffee', 11200); insert into product values (null,' Mineral Water', 3500); these are all the contents of the article "what are the two ways for mysql to insert records?" Thank you for reading! I believe you will gain a lot after reading this article. The editor will update different knowledge for you every day. If you want to learn more knowledge, please pay attention to the industry information channel.