I have one table with two fields say a,b.
Now I have inserted 5 records in a & b column.
Now after that I want to add one more column(c) in that table using alter command.
Then I want to insert 5 values in that c column so that there will be 5 completely filled records.
Now what code should I write to insert this?Please assist.
Insert command is not working, by update we can update
one value at a time but I want to insert all 5 values at the same time. So please tell me code..
I am using MySQL 5.1 console.
Pritam Chatterjee wrote:Then I want to insert 5 values in that c column so that there will be 5 completely filled records.
No, you really want to UPDATE your 5 existing records and set the new column to a given value on each record. Use SQL UPDATE without a WHERE clause if you want to update all the rows to the same value at the same time.
INSERT = create new record
UPDATE = modify existing record