码迷,mamicode.com
首页 > 数据库 > 详细

SQL的常用语句

时间:2015-09-11 15:58:46      阅读:160      评论:0      收藏:0      [点我收藏+]

标签:

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的常用语句

标签:

原文地址:http://www.cnblogs.com/xianhaiyan/p/4800887.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!