Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to modify a column ?

Status
Not open for further replies.

satellite03

IS-IT--Management
Dec 26, 2003
248
IN
here i am in search of a SQL command. i want to modify(NOT DELETE) some column value in my MS SQL database.what would be the query ?
what is the command to modify column values ?
 
Use the UPDATE command.

For a single record:

UPDATE

SET [fieldX] = new value
WHERE [fieldY] = primary key or some other field which distinguishes the row

For a mass update (e.g., pricing changes by 10% on all prices):

UPDATE products
SET price = (price * 1.1)

No where clause needed because you are updating all records.

I hope this helps.

Krickles | 1.6180

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top