tehon3299 Posted March 13, 2003 Posted March 13, 2003 Will the UPDATE command for SQL work if the table is empty? Basically, if I want to insert a whole bunch of stuff into my table, do I HAVE to use the INSERT command to put stuff in the table then use UPDATE after that or can I use UPDATE to insert stuff right from the beginning? Quote Thanks, Tehon
*Experts* Nerseus Posted March 13, 2003 *Experts* Posted March 13, 2003 You must use INSERT. -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Leaders quwiltw Posted March 13, 2003 Leaders Posted March 13, 2003 tehon, your posts keep getting moved for a reason. pls pay attention to the forum titles and post them where it makes sense (ie. a database question in the database forum). Inserts insert data and Updates update existing data. Quote --tim
tehon3299 Posted March 13, 2003 Author Posted March 13, 2003 Sorry. How come when I use the update command, it inserts the same thing in every row? It inserts the last thing that is suppose to be inserted, in every row. Quote Thanks, Tehon
*Experts* Nerseus Posted March 13, 2003 *Experts* Posted March 13, 2003 Your update is not inserting, it is updating every row. I would guess that you have no WHERE clause on your UPDATE, and hence it affects every row. To know why, we'd have to see the code that does the UPDATE. -Ner Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.