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
  • 459
  • 2
  • 7
  • 15

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
  • 30,923
  • 9
  • 73
  • 85
-4
create table myNewTable like baseTable;
András Váczi
  • 31,778
  • 13
  • 102
  • 151