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

数据库查询问题小记

时间:2017-03-08 14:47:49      阅读:153      评论:0      收藏:0      [点我收藏+]

标签:sel   查询   bsp   rod   ble   adt   date   insert   数据库查询   

一般查询数据

select * from table where key=‘123456abcd‘  and num=123456

查询数据某字段不为空的

select * from table where key is not  null

修改数据

upadte table set key=‘123‘ where id=123

新增数据

insert into table(name,sex,age) values (‘张三‘,‘男‘,22)

新增数据并返回新增数据ID

insert into table (Id,key, produceDate)  output inserted.id  values (349,‘23ss‘, ‘2017-03-08 00:00:00‘)

数据库查询问题小记

标签:sel   查询   bsp   rod   ble   adt   date   insert   数据库查询   

原文地址:http://www.cnblogs.com/DearDWJ/p/6519370.html

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