标签:数据 span select 部分 结构 ble let count ast
1、从一个表向另外一个表复制行
1 inset into dept_east (deptno, dname, loc) 2 select deptno, dname, loc 3 from dept 4 where loc in (‘new york‘, ‘boston‘)
2、复制表结构
更改where条件也可以复制部分数据
1 mysql> create table film_2 as 2 -> select * from film 3 -> where 1 = 0\G
3、阻止向某几列的插入
创建一个视图,该视图只显示允许用户访问的列
4、从表中删除所有记录
delete不带where即可
5、group by的含义相当于选择列值相同的列进行合并,一般配合聚集函数使用
1 select film_id from film_3 group by film_id having count(*) >= 2
标签:数据 span select 部分 结构 ble let count ast
原文地址:http://www.cnblogs.com/zcy-backend/p/6817872.html