I have two tables tb1 and tb2
there are four column in tb1 tb1c1,tb1c2,tb1c3,tb1c4
and three column in tb2
tb2c1,tb2c2,tb2c3
when i am inserting values into the tb1 then I want tb2c2 containt as value into the tb1c3 field
I though to do something like follows:
insert into tb1(tb1c1,tb1c2,tb1c3,tb1c4) values('1','2',select tb2c2 fromtb2 where tb1c1=1)
please help me in this query
What I have tried:
I have two tables tb1 and tb2
there are four column in tb1 tb1c1,tb1c2,tb1c3,tb1c4
and three column in tb2
tb2c1,tb2c2,tb2c3
when i am inserting values into the tb1 then I want tb2c2 containt as value into the tb1c3 field
I though to do something like follows:
insert into tb1(tb1c1,tb1c2,tb1c3,tb1c4) values('1','2',select tb2c2 fromtb2 where tb1c1=1)
please help me in this query