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

Explain the benefits of user-defined functions?

0 Answers  


Define the term DML, DDL and DTL?

1 Answers  


Can we use where and having clause together?

0 Answers  


Why are views required in the sql server or in any other database?

0 Answers  


What is the recursive stored procedure in sql server?

0 Answers  






What are the benefits of filtered indexes?

0 Answers  


What are a database and a data warehouse?

0 Answers  


How many clustered indexes can be created on a table? I create a separate index on each column of a table. what are the advantages and disadvantages of this approach?

0 Answers  


Do you know what is xpath?

0 Answers  


what is the system function to get current user's user id? : Sql server database administration

0 Answers  


What is a transact-sql statement?

0 Answers  


What is db stored procedure?

0 Answers  


Categories