| - demand explanation
Adding data to the curriculum, it requires the use of an insert statement to achieve
| - realization of ideas
If you use one sentence, that is, once inserted into the multiple values, MySQL syntax is:
INSERT INTO table name [( list of field names )] values ( value list ), ( value list ), .... ( value list );
| - Content Code
# Job using INSERT INTO add data to a curriculum use MySchool; # switching database Create Table `timeTable` ( ` course number ` int ( . 4 ) Primary Key AUTO_INCREMENT, ` course name ` VARCHAR ( 20 is ) Not null , ` `the number of hours int ( 5 ) not null , `semester number` int ( 3 ) not null ) charset = utf8; # create a table INSERT INTO`timeTable` (` `course number, course name` `,` `a few hours,` No. semester ') values ( default , ' LogicJava ' , 220 , 1 ), ( default , ' HTML ' , 160 , 1 ), ( default , ' JavaOOP ' , 230 , 2 ); # add data
| - operating results