REPLACE INTO {table_name} {colomns} VALUES ({x})
INSERT INTO {table_name} {colomns} VALUES ({x})
INSERT IGNORE INTO {table_name} {colomns} VALUES ({x})
实例
INSERT INTO Persons (LastName, Address) VALUES (‘Wilson’, ‘Champs-Elysees’)
更新某一行中的一个列
UPDATE Person SET FirstName = ‘Fred’ WHERE LastName = ‘Wilson’
更新某一行中的若干列
UPDATE Person SET Address = ‘Zhongshan 23’, City = ‘Nanjing’
WHERE LastName = ‘Wilson’
INSERT INTO table1 ( column1 )
SELECT col1
FROM table2
INSERT INTO table1 ( column1, column2, someInt, someVarChar )
SELECT table2.column1, table2.column2, 8, 'some string etc.'
FROM table2
WHERE table2.ID = 7;