SQL I Forget

I tend to forget how to insert into another table from selecting the data form another table so here is an upgrade snippet for next time.


 
INSERT INTO [FieldExplorer].[dbo].[Field_Guide_Annotations]
 ([Record_ID],[Value],[Type],[Table_ID])
Select [Id], [Definition], 0,6 
From [FieldExplorer].[dbo].[Field_Details]
Where [Definition] is not NULL 
Comments [0]
All comments require the approval of the site owner before being displayed.
Name
E-mail
(will show your gravatar icon)
Home page

Comment (Some html is allowed: a@href@title, b, blockquote@cite, em, i, strike, strong, sub, super, u) where the @ means "attribute." For example, you can use <a href="" title=""> or <blockquote cite="Scott">.  

Enter the code shown (prevents robots):

Live Comment Preview