0
How to insert data into a table after altering using query(SQL)?
My student table consist of two columns Name and Roll. I alter my table and add Address column, now I don't know how to insert address to my existing row with Name='Ballu' and Roll=1. Please help! Thanking you.
5 Answers
+ 1
UPDATE [table_name] SET address = [your value]
WHERE
name = 'Ballu'
and
roll = 1
0
To insert data in a table you need to use INSERT command.
Something linke this:
INSERT INTO {table name} VALUES ( {put the values here, separated by comma})
http://www.w3schools.com/sql/sql_insert.asp
0
@Daniel I tried this but it create a whole new row but I want to insert address only to my existing row.
0
So you need to use the UPDATE command
0
@Daniel Thank you