Need help with a SQL query
July 7, 2008 4:04 PM
Subscribe
I've got what should be an uber-simple SQL question....
I have a database with ~140,000 entries. I added a column (referred to here as "daviddata"). Currently, all ~140K entries into said column are null, as they should be. However, I want to change all ~140K entries to have some value in that column. Either a '1' or a 'Yes' or something similar. It's a nvarchar(50), if it matters.
How can I quickly update this column? All of the entries in that column will be exactly the same, with no variation, but I can't seem to figure this (seemingly) simple task out. Thanks in advance!
posted by omnipotentq to computers & internet (8 comments total)
UPDATE tablename SET davidname = 1 WHERE davidname = *
W3Schools is a good basic reference for this kind of thing
posted by chrisamiller at 4:12 PM on July 7