Need some urgent help in using UPDATE command in SQL
Posted: Sat Oct 20, 2007 12:17 am
I have two tables:
Table Name: table1
Table Rows: a b
Table Name: table2
Table Rows: a b c d e f
Initially c of table2 is empty. I want to actually fill it up from table1 using some statement like:
Where d belongs to table2.
Is this possible?
Table Name: table1
Table Rows: a b
Table Name: table2
Table Rows: a b c d e f
Initially c of table2 is empty. I want to actually fill it up from table1 using some statement like:
Code: Select all
UPDATE table2 SET c={SELECT a FROM table1 WHERE b=d}Where d belongs to table2.
Is this possible?