#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Nov 2003
    Location
    Germany
    Posts
    9
    Rep Power
    0

    Angry searching empty coloumns


    Hello,

    i have a little problem. How can i search for empty coloums. Say, there is an Coloums "File" and there is nothing saved. (THis coloums is also untouched.) How can i search for Rekords with this coloumn "file" empty.

    SELECT * FROM Table WHERE file LIKE '' doesn't work.

    SELECT * FROM Table WHERE file LIKE NULL returns a syntax-error. :-(

    Please help me, thanks.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2003
    Posts
    249
    Rep Power
    14
    Try:

    WHERE Mycolumn IS NULL

    Do note, that it "MyColumn" is a character column, '' is not the same as NULL, unlike in Oracle.
    Martijn Tonies
    Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle
    Upscene Productions
    http://www.upscene.com

IMN logo majestic logo threadwatch logo seochat tools logo