码迷,mamicode.com
首页 > 其他好文 > 详细

对表中数据的操作

时间:2015-08-19 23:25:37      阅读:163      评论:0      收藏:0      [点我收藏+]

标签:

--向表中添加数据
insert into Table_1(电话,成绩) values(2000101,12)
--修改表中的数据
update Table_1 set 电话=12138 where 电话=2000101
--删除表中的数据
delete from Table_1 where 电话=12138
--删除表中所有数据
truncate table Table_1
--查询语句
select select_list  from table_list  where search_conditions
group by group_by_list
having search_conditions 
order by order_list 
--选择所有列
select*from Table_1
--特定列
select xh,xm from Table_1
--top子句
select top 2* from Table_1 -- 查询stu里前2行数据

限制返回到结果集中的行数
--使用表别名
--表名 as 表别名
--where 子句(查询条件查询内容的属性)

 

对表中数据的操作

标签:

原文地址:http://www.cnblogs.com/liuyudong0825/p/4743503.html

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