Friday, May 21, 2010

Insert table to another table in sql

Insert tbltech(FirstName,Gender,EmpGroup)
Select FirstName,Gender,EmpGroup from indigo_tech

--===========================
INSERT INTO Members ( memberID, memberareaID )
VALUES(@memberID,(SELECT memberareaID FROM MemberAreas WHERE areadescription = '@areadescription'))
--====================

Select FirstName,Gender,EmpGroup Into Newtbl from indigo_tech

No comments:

Post a Comment