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 is the advantage of specifying WITH GRANT OPTION in the GRANT command?

2 Answers  


What is Covering Indexes? Plz explain with example

3 Answers  


Give an example of SQL injection attack ?

0 Answers   HAL,


Mention the different types of replication in sql server.

0 Answers  


What are subqueries in sql server? Explain its properties.

0 Answers  






Tell me what is sql profiler?

0 Answers  


how many bits ip address consist of? : Sql server database administration

0 Answers  


How do you find the number of rows in a table?

7 Answers  


How column data types are determined in a view?

0 Answers  


What is the difference between Clustered and Non-Clustered Index?

0 Answers  


How to delete exactly duplicate records from a table?

0 Answers  


How to create an index on a view?

0 Answers  


Categories