View Full Version : Insert value into every row of a table?
FleaBag
01-27-2005, 02:58 PM
A simple query I know, but can someone explain the query to insert a value into every row of a table.
For instance I want to insert the value no into every row named screen in table dl_files... Thanks!
Marco van Herwaarden
01-27-2005, 03:04 PM
UPDATE dl_files
SET screen = 'no';
If you don't want all rows to be affected, you will just add a WHERE clause to the end.
PS I asume you talk about existing rows.
FleaBag
01-27-2005, 03:06 PM
That's right, thanks a lot. Ive basically been modifiying my table from Trafix' jukebox hack so the data works with one of the download hacks.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.