JavaEE.sql.Insert插入数据
INSERT INTO |
格式 |
//通用格式 INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); //使用默认顺序 INSERT INTO table_name VALUES (value1, value2, value3, ...); //插入多条 INSERT INTO table_name (field1, field2,...fieldN) VALUES (valueA1,valueA2,...valueAN), (valueB1,valueB2,...valueBN),(valueC1,valueC2,...valueCN)....; |
S1.常用插入数据用法 |
INSERT INTO test_master ( id, userName, pwd, lastPay,bindNo) VALUES ( 1006, 'user006','admin00',NOW(),'bn006' ) |
S2.插入多个 |
INSERT INTO test_master ( id, userName, pwd, lastPay,bindNo) VALUES ( 1007, 'user007','admin00',NOW(),'bn007' ),( 1008, 'user008','admin00',NOW(),'bn008' ) |
|
|
ref |