Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2012
    Posts
    36

    Unanswered: Setting Null value to a column

    Hello friends,

    i have a query which reads as follows

    select emp1,emp2,NULL from test;

    The third column is a dummy column which should have NULL values.

    Can somebody help me in solving this.??

    Thanks in advance

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by ijunaid View Post
    Can somebody help me in solving this.??
    solving what?

    that query does exactly what you said you wanted
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jun 2004
    Location
    Liverpool, NY USA
    Posts
    2,509
    IF YOU WANT TO NAME THE COLUMN THEN

    select emp1,emp2,NULL emp3 from test;
    Bill
    You do not need a parachute to skydive. You only need a parachute to skydive twice.

  4. #4
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    bill, nice value add
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •