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中使用此语句)
SQL的常用语句的更多相关文章
- SQL server 常用语句
SQL Server中常用的SQL语句 1.概述 2.查询概述 3.单表查询 4.连接查询 5.带有exists的相关子查询 6.SQL的集合操作 7.插入操作 8.删除操作 9.修改操作 10. ...
- SQL Server常用语句
欢迎和大家交流技术相关问题: 邮箱: jiangxinnju@163.com 博客园地址: http://www.cnblogs.com/jiangxinnju GitHub地址: https://g ...
- sql数据库常用语句总结
1.增加字段 alter table docdsp add dspcodechar(200)2.删除字段 ALTER TABLE table_NAME DROP COLUMNc ...
- SQL触发器 常用语句
一.创建一个简单的触发器 CREATE TRIGGER 触发器名称 ON 表名 FOR INSERT.UPDATE 或 DELETE AS T-SQL 语句 注意:触发器名称是不加引号的. ...
- Sql sever 常用语句(续)
distintct: 查询结果排除了重复项(合并算一项)--如查姓名 select distinct ReaName from UserInfo 分页语句:(查询区间时候应该查询出行号,作为分页的 ...
- [SQL]数据库常用语句
1.使用旧表创建新表 SELECT * INTO CC FROM AA ; (适用于版本SQL SERVER)
- SQL注入常用语句
整形参数判断 1.直接加' 2.and 1=1 3. and 1=2 如果1.3运行异常 2正常就存在注入 字符型判断 1.直接加' 2.and '1'='1' 3. ...
- sql 操作表常用语句,语法
新增列:alter table 表名 add 新列名 数据类型 删除列:alter table 表名 drop column 列名 删除约束:alter table 表名 drop constrain ...
- sql server常用函数、常用语句
一.常用函数 1.字符串函数 : charindex(':','abc:123') --寻找一个字符在一段字符串中起始的位置 len('zhangsan') --获取一段字符串的长度 lef ...
随机推荐
- 11.Events
1.A type that defines an event member allows the type (or instances of the type) to notify other obj ...
- Python入门-行和缩进
学习Python与其他语言最大的区别就是,Python的代码块不使用大括号({})来控制类,函数以及其他逻辑判断.python最具特色的就是用缩进来写模块. 缩进的空白数量是可变的,但是所有代码块语句 ...
- Heap and HashHeap
Heap 堆(英语:Heap)是计算机科学中一类特殊的数据结构的统称.堆通常是一个可以被看做一棵树的数组对象.在队列中,调度程序反复提取队列中第一个作业并运行,因为实际情况中某些时间较短的任务将等待很 ...
- [转]使用onclick跳转到其他页面/跳转到指定url
如果是本页显示可以直接用location,方法如下: ①onclick="javascript:window.location.href='URL'" ②onclick=" ...
- 流媒体基础实践之——RTMP和HLS分发服务器nginx.conmf配置文件(解决了,只能播放RTMP流而不能够播放HLS流的原因)
user www www; worker_processes ; error_log logs/error.log debug; #pid logs/nginx.pid; events { worke ...
- for循环的嵌套
循环的四要素:初始条件,循环条件,循环体,状态改变. 打印左下角是直角的三角形: 打印左上角为直角的三角形: 打印右上角为直角的三角形: 打印右下角为直角的三角形: 99口诀表:
- amd64_or_ia64?
amd64 网上资料: 1. IA64是intel推出的架构,AMD64是AMD推出的.IA64不兼容原有的32位x86架构指令集,后来被证明这种做法是不成功的,于是Intel发展处IA64e架构,对 ...
- 高处胜寒 php中奖概率算法,可用于刮刮卡,大转盘等抽奖算法
<?php /* * 经典的概率算法, * $proArr是一个预先设置的数组, * 假设数组为:array(100,200,300,400), * 开始是从1,1000 这个概率范围内筛选第一 ...
- iOS 开发之 Xcode6 installation failed invalid argument!
1.运行模拟器的时候 报出: installation failed invalid argument! 原因分析: 我把Bundle indentifier 置为空了! http://stackov ...
- OpenGL的glRotatef旋转变换函数详解
OpenGL的glRotatef旋转变换函数详解 先看一下函数定义:void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLflo ...