Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 wat's wrong in the query

Author  Topic 

jogin malathi
Posting Yak Master

117 Posts

Posted - 2007-03-27 : 06:26:42
insert into o_country(cname) values(select cname from countries where cid=5)

o_country
----------
Cid int(primary key)
Cname varchar(50)

countries
----------
Cid int(primary key)
Cname varchar(50)


Malathi Rao

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-03-27 : 06:31:03
[code]
insert into o_country(cname)
select cname
from countries
where cid = 5
[/code]


KH

Go to Top of Page
   

- Advertisement -