How to update multiple rows with one update statement in ms sql server?



How to update multiple rows with one update statement in ms sql server?..

Answer / Anmol Kumar

To update multiple rows with one update statement in MS SQL Server, you can use the WHERE clause to specify the rows that need to be updated. Here's an example:nn```sqlnUPDATE TableNamenSET Column1 = 'New Value', Column2 = 'New Value'nWHERE Condition;n``` Replace `TableName`, `Column1`, `Column2`, and `Condition` with your table name, the column names you want to update, and a condition that specifies which rows should be updated.n

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL Server Interview Questions

What is exporting utility?

1 Answers  


How many ways to create table-valued functions?

1 Answers  


Do you know what are the restrictions applicable while creating views? : SQL Server Architecture

1 Answers  


What is bcp? When does it used?

1 Answers  


What are triggers? How do you invoke a trigger on demand?

1 Answers   Hexaware,


How to use column default values in insert statements in ms sql server?

1 Answers  


Write a SQL query to make a column as unique?

1 Answers   Cap Gemini,


Is t sql the same as sql server?

1 Answers  


Write a SQL queries on Self Join and Inner Join.

1 Answers   Aspiring Minds,


What are the functions in sql server?

1 Answers  


what are constraints? : Sql server database administration

1 Answers  


Why we use functions in sql server?

1 Answers  


Categories