SQL的常用语句

select * from g_members where id between '16' and '31' order by id desc 倒序排列

select * from g_members_thirdparty where uid in(select id from g_members where mobile='13438342547')

select * from g_members where email in (select  DISTINCT email from g_members)

select * from g_members where id='16' and mobile='1882154647'

select * from g_members where id='16' or mobile='1882154647'

select * from g_members where mobile='18780010265' insert into g_members (mobile)values('13178849632')

insert into g_members values('1607001','13178849632') 向表里插入数据,需要的数据都需插入

update g_members set mobile='110' where mobile='13178849632'
DELETE from g_members where mobile='110'

select g_members.id,g_members.mobile,g_members_thirdparty.tokenkey from 
g_members join g_members_thirdparty on g_members.id=g_members_thirdparty.uid

select * into test from g_members (sql中使用此语句)

create table test(select * from g_members)(MYSQL中使用此语句)

上一篇:hibernate框架内容整理 学习


下一篇:Jenkins Job 自杀 groovy