You have been examining the contents of the product table in the temp database. You have noticed that many values in the price column are set to NULL. You want to output some data from this table. Rather than outputting NULL values, you want to replace any value that is set to NULL with 0.

Which of the following T-SQL statements can you use to accomplish this goal?

 Posted by Rajkatie on 6/24/2013 | Category: Sql Server Interview questions | Views: 4760 | Points: 40
Select from following answers:
  1. SELECT product_Id, product_name, product_description COALESCE(price, 0) as 'price' FROM product;
  2. SELECT product_Id, product_name, product_description, price FROM product where price is not null;
  3. SELECT product_Id, product_name, product_description, price FROM product where price is null;
  4. All Above

Show Correct Answer


Asked In: measureup.com | Alert Moderator 

Comments or Responses

Login to post response