The SQL or Structured Query Language (structured query language) is used to manage data in a relational database system (RDBMS). In this article, you will learn about frequently used SQL commands that every developer should know. This material is ideal for those who want to refresh their knowledge of SQL before a job interview. We will be using MySQL or MariaDB syntax in this article. But most of the commands are patform-independent and will work on SQL Server, PostgreSQL, SQLite, OracleDB and others.
Sometimes you need to import large database into MS SQL Server, but when you use Microsoft SQL Server Management Studio, it doesn't do the job right, but shows the message "Insufficient memory". Or maybe you need to do a batch import of sql script to database instead of doing the import by hand. Here comes in handy the sqlcmd command line tool. It can import large .sql files, can be run from a batch script, installer, etc.
How to use sqlcmd command-line tool to import large .sql file?
Open a command prompt window.
In the Command Prompt window, type: sqlcmd -S yourServer\instanceName -i C:\yourScript.sql
The progress of operation is written to the command prompt window.