SQLTeam.com | Weblogs | Forums

Update Query


#1

HI,

i have table with 200 rows, i need to update the one column values,

Column "TYP_LDO_PRODUCT" --> values are same KES201, but , i need to change KES150 for only one row, not to other row.

Update Query

Update Product
SET TYP_LDO_PRODUCT = "KES201"
WHERE Rated_Load = 320 and Passengers_Number =4 and Main_Standard = "EN81-20"

This above query change the two rows, but i need to update only one .

is it possible?


#2

You could use the TOP(1) command.

UPDATE TOP(1) Product
SET TYP_LDO_PRODUCT = "KES201"
WHERE Rated_Load = 320 and Passengers_Number =4 and Main_Standard = "EN81-20"