SQL——查询语句

一、简单查询。

  1. 查询student表中的学号、姓名和年龄并为列设置别名,结果按学号升序排。
    select sno as '学号', sname as '姓名', sbirthday as '年龄'
    
    from student
  2. 查询姓“王”的学生信息。
    select *
    
    from student
    
    where sname like '王%'

猜你喜欢

转载自blog.csdn.net/WSS_ang/article/details/84981569