Trebizond

Thoughts on Life, History, Classics, Computers, Games, and Debian Linux

Name:
Location: Massachusetts, United States

Thursday, June 14, 2007

More SQL fun -- a copy statement

Here's a simple copy / paste T-SQL statement. This uses the Northwind Database, but you could adapt it for your needs -- and just remember, you can't do the select *, because of the identify/auto-numbering on CategoryID

insert into categories
select CategoryName, Description, Picture from categories where categoryid = '1'

0 Comments:

Post a Comment

<< Home