请问NOT IS NULL与NOT LIKE该怎么用,帮我写几个例句看看,我手头上没有这方面的资料,请各位帮帮忙,SQL我不怎么会的!

解决方案 »

  1.   

    select * from table1 where field1 is not null and field2 not like "%a_b%"
      

  2.   

    select * from biao
    where id is not null
      

  3.   


      1.   Select * from a where a.name is not null
      2.   Select * from a where a.name not like '%d%'
      

  4.   

    select * from biao
    where name  not like '%h%'
      

  5.   

    查询所有不姓刘的学生姓名
    SELECT sname FROM Student WHERE sname NOT LIKE '刘%'
    %代表任意长度(可以为0)的字符串
      

  6.   

    查询所有有成绩记录的学生学号和课程号
    SELECT sno,cno FROM SC WHERE grade IS NOT NULL
      

  7.   

    那个NOT LIKE的还是不行啊,再帮忙看看!谢谢!