Choose Skin

Command to run sql script file



Manish Kumar
Computer

Write this command in command prompt for running a sql script from a sql file using its path. 

Command :

sqlcmd -S server-name -d database-name -i script.sql

 

Example :

sqlcmd -S LPNOA67-85SQLEXPRESS -d TestDatabase -i Testscript.sql