笔试里除了复杂一些的SELECT语句,也会有一些UPDATE等语句,从W3School看了一下,总结一下:
INSERT语句
语法:
INSERT INTO table_name (列1, 列2,...) VALUES (值1, 值2,....)
实例:
INSERT INTO Persons (LastName, Address) VALUES ('Wilson', 'Champs-Elysees')
UPDATE语句
语法:
UPDATE 表名称 SET 列名称 = 新值 WHERE 列名称 = 某值
实例:
UPDATE Person SET Address = 'Zhongshan 23', City = 'Nanjing' WHERE LastName = 'Wilson'
DELETE语句:
语法:
DELETE FROM 表名称 WHERE 列名称 = 值
实例:
DELETE FROM Person WHERE LastName = 'Wilson'