How to exporting a databse structure (or many tables) for import In TSQL: When right click a table you have the option to Script table as > Create

which creates the table script including the constraints
If you want to port the database or  large portion of the table:

is it possible to have a script create the tables in 1 file and the  FK constraints in another file. The 2 files can then be used to recreate the tables and relationships in another DB
You can use the Generate Script feature to output what you need.


Right click on the database and select Task -> "Generate Scripts..."
Choose "Select specific database objects" and check the "Tables" box to script out all tables (and any other necessary objects, like schemas or database roles)
On the next dialogue, click the "Advanced" button and ensure that "Script Foreign Keys" is set to True.
Finish the wizard and output your script to a new window, clipboard, or file.


This will automatically order the object creation in the proper order so that you can run the entire script once to generate all tables/constraints/views/etc. that you need (tables, then constraints, then foreign keys, then extended properties, and so on).