插入数据
insert into table_name ---没有指定列名
values(1,2,3)
insert into table_name(a,b,c) ---指定列名,插入整行数据
values(1,2,3)
insert into table_name(a,b) ---指定列名,插入部分数据
values(1,2)
更新数据
UPDATE table_name
SET column1=value1,column2=value2,...
WHERE some_column=some_value;
删除数据
DELETE FROM table_name
WHERE some_column=some_value;
不删除表的情况下,删除表中所有的行。这意味着表结构、属性、索引将保持不变:
DELETE FROM table_name;
或
DELETE * FROM table_name;