I have a table in which phno is one of the columns.i do have
some values in tht phno column.i need to update phno column
values with 0(zero) as prefix.give me a correct solution plz...

Answers were Sorted based on User's Feedback



I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / anand k

Hi,

Yoy didn't mention the datatype of the column "phone
number"

prob the varchar datatype has used to the phno.

update <tablename>
set phno = cast(0 as varchar(1)) + phno

Is This Answer Correct ?    16 Yes 1 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / durgaprasad

Thank you very much Mr.Anand

Is This Answer Correct ?    0 Yes 1 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / rajshekar

update <tablename>
set phno=cast (0 as datatype(1))+phno

Is This Answer Correct ?    0 Yes 1 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / khalid moin

update <tablename>
set <column name>='0'||<coulmn name>;

this query will update the values present in column with
prefix 'o'

Is This Answer Correct ?    0 Yes 1 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / mechinenirao

update <tablename>
set Phno = '0' + phno

Is This Answer Correct ?    2 Yes 4 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / a

update <table_name> set phno = Convert(int, '0' +
Convert(varchar(10),phno))

Is This Answer Correct ?    1 Yes 3 No

I have a table in which phno is one of the columns.i do have some values in tht phno column.i need ..

Answer / goutham

update <table name>
set column = '0' + ph no:

Is This Answer Correct ?    3 Yes 6 No

Post New Answer

More SQL Server Interview Questions

What are all new concepts in SQL Server 2008? That is Exactly Difference between 2005 to 2008

2 Answers   IBM,


What is merge join?

0 Answers  


What are the different normalization forms?

0 Answers  


What is the sql case statement used for?

0 Answers  


How make remote connection in database?

1 Answers  






Explain differentiate between a having clause and a where clause?

0 Answers  


How to rename an existing table with the "sp_rename" stored procedure in ms sql server?

0 Answers  


Can foreign key be deleted?

0 Answers  


Define the one-to-one relationship while designing tables.

0 Answers  


How can I create a table from another table without copying any values from the old table?

3 Answers  


What is implicit cursors?

0 Answers  


What happens if strings are casted into wrong code pages in ms sql server?

0 Answers  


Categories