How to add records to the database
How do I add records to the database? Perhaps many people do not understand, in order to let you understand better, the editor summed up the following content, I hope you can gain something according to this article.
The sql command to add records to the database is INSERT INTO.
Syntax of the INSERT INTO statement
INSERT INTO statements can be written in two forms, namely:
The first form
Instead of specifying the name of the column in which you want to insert data, simply provide the value to be inserted:
INSERT INTO table_nameVALUES (value1,value2,value3,...)
The second form
You need to specify the column name and the value to be inserted:
INSERT INTO table_name (column1,column2,column3,...) VALUES (value1,value2,value3,...)
Example:
Insert into # tblInsert (Col1, Col2, Col3, Col4) values ('Zhang San', 30, 9850.5, 1); insert into # tblInsert (Col1, Col2, Col3, Col4) values ('Li Si', 40, 10000, 0); insert into # tblInsert (Col1, Col2, Col3, Col4) values ('Wang Wu', 50, 8753.15, 1) The above is the method shared by the editor to add records to the database. If you have similar doubts, you might as well refer to the above method to try. If you want to know more about it, please follow the industry information.