0

how I would copy a table with all constraints?

I run select * into myNewTable from baseTable where 1=0

This copy a table but no with constraints

Diego Flores
  • 449
  • 2
  • 7
  • 14

2 Answers2

1

You have to use the GUI management tool to create a script and then run that - you cannot do it directly - take a look here (or here) for relatively clear explanations.

Vérace
  • 26,808
  • 7
  • 61
  • 75
-4
create table myNewTable like baseTable;
dezso
  • 28,436
  • 12
  • 89
  • 132