--精确限制条件
--模糊限制条件
select * from [dbo].[userinfo]
where username like '%小节';--
select * from [dbo].[userinfo]
where username like '陈%';
delete from [dbo].[userinfo]
where username like '陈%';--删除姓陈的名字
between.....and.....语法
select * from [dbo].[userinfo]
where ID between 8 and 10;--查询id在8到10的行
select * from [dbo].[userinfo]
where ID not between 8 and 10;--与上一个相反
select * from [dbo].[userinfo]
where pron between '9BDB10' and '9BDB12';--字符串查询
select * from [dbo].[userinfo]
where creatTime between '2015-07-29 ' and '2015-08-01 23:59:59.999';--查询时间
当前时间
select getdate();--获取当前数据库时间
1161

被折叠的 条评论
为什么被折叠?



