您的位置:首页 > 数据库 > Oracle

【oracle资料整理】--【4】基本查询

2008-04-11 20:01 471 查看
查询 select   
      select * from student;

      select xh,xm,sex from student;    

      select * from student where xh like 'A%1'; %任意多个字符
      select * from student where xh like 'A__1'; _1个字符
      select * from student where xh like '%A%';            

     select * from student where xh like 'A%';
     select * from student where xh like '%A';                              

      select * from student where xh = 'A%';
                       
  
      select * from student
      order by birthday ;  升序 (order by birthday asc;)
 
      select * from student
      order by birthday desc; --降序
  
      select * from student
      order by birthday desc,xh asc; --按birthday 降序 按xh升序(asc/默认)
                
      select * from student
      where sex='女' or birthday='1999-02-01';

      select * from student
      where sex='女' and birthday='1999-02-01';

      select * from student
       where salary > 20 and xh <> 'B002'; (!=) 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  oracle