All Pinky, no Brain

...life tricks us with moments when everything seems to go right, but these soon pass...

Pages

  • Home
  • All About Me

Friday, March 13, 2009

have you seen this cat...?

have you seen this cat
Posted by Kevski at 11:21 AM

Friday, March 6, 2009

Copy existing SQL Table structure into a new empty table..? Easy...

Here's the SQL Server thing: I want to copy an existing table's structure, but not the data.

Here's thefix:
SELECT * INTO MyNewTable
FROM ExistingTable
where 0=1

... which will do exactly that! Nice. Thanks to Josh for that.

Posted by Kevski at 1:53 PM
Labels: SQL
Newer Posts Older Posts Home
Subscribe to: Posts (Atom)

Blog Archive

  • ►  2010 (13)
    • ►  July (5)
    • ►  June (1)
    • ►  March (2)
    • ►  February (2)
    • ►  January (3)
  • ▼  2009 (25)
    • ►  December (4)
    • ►  November (6)
    • ►  October (4)
    • ►  July (3)
    • ►  June (2)
    • ►  May (2)
    • ▼  March (2)
      • have you seen this cat...?
      • Copy existing SQL Table structure into a new empty...
    • ►  February (1)
    • ►  January (1)
  • ►  2008 (6)
    • ►  December (6)

BlogRoll

  • Al's Journal
  • Boris Johnson
    Boris Johnson: Americans would never accept EU restrictions – so why should we?
    9 years ago
  • Dylan Beattie's Blog
    Summer 2017 .NET Community Update
    7 years ago
  • Elevenses
  • Your Excel Expert
    Excel 2010
    13 years ago
Simple theme. Powered by Blogger.