常用SQL

来源:互联网 发布:Mac pro 怎么看芒果TV 编辑:程序博客网 时间:2024/06/05 20:44

1.查询某个时间段内的数据

select count(*) from T_CDR where DATE(START_TIME)>='2014-06-01' and DATE(START_TIME)<'2014-06-27';


2.修改数据

update t_user set status='02' where smartcard_id='8441210230028529' and user_id=403739;




3.

update t_real_asset t set t.status = 'Available' where t.status = 'Loading' and t.date_time >= '2014-07-22' and t.date_time <= '2014-07-23';



0 0
原创粉丝点击