Is there an idiomatic way of doing this?
+1
A:
This works in most DBs:
create table blah as
select * from foo where 1=0
Note that this will not copy and PKs, indexes, etc.
Donnie
2009-11-23 01:17:30
This indirection does not work in SQL Server.
Aaron Bertrand
2009-11-23 02:37:17