SQL基础语句学习
(1)select查询:
语句1:从表a中按照条件a和/或条件b去查询*/列a/列i,…,列j,将结果按照列n排序:
select */列a/列i,...,列j from 表a where 条件 and/or 条件 order by 列n;
语句2:从表a中按照条件a和/或条件b去查询列j,要求不重复,将结果按照列n排序:
select distinct 列j from 表a where 条件 and/or 条件 order by 列n;
(2)insert into 增加:
语句1:在表a中插入列i,…,列j对应的值为:值i,…,值j;
insert into 表a(列i,...,列j) values(值i,...,值j);
语句2:在表a中插入一行;
insert into 表a values(值1,...,值end);
(3)delete删除:
语句1:在表a中删除列i,…,列j;
delete 列i,...,列j from 表a;
(4)update改:
语句1:在表a中更改列i…j的值为值i…j;
update 表a set 列i=值i,...,列j=值j;