Right-click the table in Object Explorer and select Script Table as> New> New Query Editor.

You can also do this for multiple tables using Object Explorer Information (F7):

Or right-click the database and use the Tasks> Generate Scripts wizard:

source
share