Geeks With Blogs
Deepak Tumkur
Today , i had an requirement to pass arguments to sql scripts and discovered -v switch in SQLCMD . with this we can parameterize scripts in a minute. SQLScript stored in create.sql CREATE TABLE (%root) -- variable executing the below should create a table sqlcmd -S servername -d databasename -U username -P password -i create.sql -v root="mytable1" ......

Copyright © DeepakTumkur | Powered by: GeeksWithBlogs.net