仅为笔记,哈哈哈。
查询表中的某一列
select 列 from 表明
select * from 查看所有列
去重
select distinct 列 from 表
条件查询
select 列 from 表 where 列 运算符 值
select lie from biao where lie=“beijing”
排序
select 列 from 表 order by 排序的列
order by 用于根据指定的列对结果进行排序。
插入
insert into 表(列)values(需要插入的数据)
在指定列表中插入数据
insert into biao(lie1,lie2) values(‘gou’,‘mao’) 注意带引号
更新数据
update 表名 set 列名=新值 where 列名=某值
删除
delete from 表 where 列=值