INSERT INTO Court (Name, IsActive, CreatedDate, CreatedBy, CourtTypeId) (select Name, IsActive, getdate() AS CreatedDate, CreatedBy, 3 AS CourtTypeId from Lookup where lookupcategory =36 and parentlookupid = 87)
or
INSERT INTO graduates (id, name, age)
SELECT id, name, age FROM students WHERE age >= 18;
No comments:
Post a Comment