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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update 1

Status
Not open for further replies.

CIMTEET

Programmer
Jun 25, 2001
182
US
Will this update all records that meet this condition or just the first one?

UPDATE temp_id_map SET condition = 0 WHERE object_id > 0;

GREG
 
It will update all rows that meet the WHERE conditions.
 
What if there are no WHERE conditions? Then it will populate all records with fields called 'condition'? I know these are simplistic questions. I am new to this and converting a program that is using declared temp tables to using existing tables in the database. THanks for your help.

Greg
 
It will update every row in the temp_id_map table. If that table does not have a column called "condition", then the command will throw an exception and nothing will be updated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top