Saturday, 14 September 2013

How to insert data to a new table based on condtion using INTO CLAUSE?

How to insert data to a new table based on condtion using INTO CLAUSE?

I am using SQL SERVER 2012.I am new to T-SQL.
I have a table called tblEmp,where phone no of some employee is NULL.
I want to copy all these data to a new table using INTO CLAUSE , But in
the new table it should replace all the NULL phone nos with a string 'NA'
I think this can be done by CASE statement.

No comments:

Post a Comment