Question

Is there a way to define default columns in the SQL Server Management Studio table designer? In our database we would like all tables to have an Id and CreatedDate column. It would be really handy if these columns could be present when we try to create a new table with the designer.

Était-ce utile?

La solution

No, not via SSMS. You could create a script or template containing your default columns, then run the script or open the template create the table quickly. It would then be available to open in the designer. If you create a template you could then pass it values (such as table name) that SSMS would enter into the new query window for you. See this article for more info on that.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top