插入
PPG007 ... 2024-3-29 Less than 1 minute
# 插入
插入单条数据:
INSERT INTO customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES ('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway');
1
2
2
插入多条:
INSERT INTO customers (CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES
('Cardinal', 'Tom B. Erichsen', 'Skagen 21', 'Stavanger', '4006', 'Norway'),
('Greasy Burger', 'Per Olsen', 'Gateveien 15', 'Sandnes', '4306', 'Norway'),
('Tasty Tee', 'Finn Egan', 'Streetroad 19B', 'Liverpool', 'L1 0AA', 'UK');
1
2
3
4
5
2
3
4
5
插入制定列:
INSERT INTO customers (CustomerName, City, Country)
VALUES ('Cardinal', 'Stavanger', 'Norway');
1
2
2