Is there any way to save sql file with the tables inside such that we do not import it every time from csv file?
Back-up the database?
1 Like
I agree with @NoellaG if you need this to be done for all tables.
If you need it for just a couple of tables and you don't want to create a separate database with synonym references to the tables, you could write a query to create a derived table using a "Table Valued Constructor (VALUES "claus") that would contain the data as a part of a script.
If you have millions of rows, then a CSV or TSV along with the code to import them using BULK INSERT would still be your best and fasted bet.