常用的sql语句

来源:互联网 发布:单位的网络不让上b站 编辑:程序博客网 时间:2024/04/30 06:28
1\select  sum(changemoney) from ws_log_game_newcar_host_money_change  where ngameuid=555 
or ngameuid=231 or
ngameuid=3256 or 
ngameuid=334 or 
ngameuid=7564
   系统庄的 改变值。。


2\select  distinct syspercent from ws_game_newcar_account  //排重


3\select  id,nvl(winmoney,-1) from ws_log_game_four_user_bet_records  //把 winmoney为null的显示为 1;
   


4\select salary from  s_emp  where  salary between 100 and  200;


5\表达一个列表或者一个字段 在一个范围内
   select  id,first_name  from s_emp where  id  in(3,6,9);


6\update

 update   zns_db  set name=‘xiaofei’  where id=3;


7\delete




原创粉丝点击