ARTICLE DETAIL

资讯详情

深耕郑州网站建设与运营推广的一线实战洞察。

SQL线索

SQL线索

插入

insert into 表 (列) value (),(),...;

从另一个表插入数据:

insert into 表 (列)

select 列 from 另一个表 where 限制;

删除

delete from 表 where 限制;

子查询删:

delete from 表 where 列 in (select 列 from 另一个表 where 限制);

改

update 表 set 列=值 where 列=值;

安全更新:

先select条件再update

PS:=是子查询传回一个,in有多个

查

模糊查询

select * from 表 where 列 like "%值%";

去重查询

select distinct 列 from 表;

排序查询

select * from 表 order by 列 asc/desc;

返回列表