How would you Update the rows which are divisible by 10,
given a set of numbers in column?

Answers were Sorted based on User's Feedback



How would you Update the rows which are divisible by 10, given a set of numbers in column?..

Answer / pandian s

UPDATE TableName SET Column1 = <Value>
WHERE ColumnName % 10 = 0

Is This Answer Correct ?    8 Yes 2 No

How would you Update the rows which are divisible by 10, given a set of numbers in column?..

Answer / bala

update <table> set <col> = <value> where round(<col>/10,0)
= (<col>/10)

Is This Answer Correct ?    5 Yes 0 No

How would you Update the rows which are divisible by 10, given a set of numbers in column?..

Answer / picture12345

select * from TableName where ColumnName%10=0

Is This Answer Correct ?    7 Yes 10 No

Post New Answer

More SQL Server Interview Questions

What do you mean by a Composite primary key?

0 Answers   Genpact,


What are the advantages dts has over bcp?

0 Answers  


What is updatable resultset?

0 Answers  


What is data source object?

0 Answers  


Delete duplicate rows from a table without primary key by using a single query Table Employee empname salary A 200 B 300 A 200 C 400 D 500 D 500 Output should be A 200 B 300 C 400 D 500

14 Answers  






Does the order of columns in update statements matter?

0 Answers  


What types of integrity are enforced by a foreign-key constraint

1 Answers  


What are the transaction properties?

0 Answers  


What is index, cluster index and nonclustered index?

0 Answers  


Can sql server be linked with other servers like oracle?

0 Answers  


can any one please send sql quries most used in applications.

2 Answers  


What is difference between equi join and natural join?

0 Answers  


Categories