i have to execute a sql command from a batch file. like :-
“Select top 1 versionNumber from SchemaVersion order by Id desc”
and Show its result on batch file , just when this batch file gets open.
please can any one suggest me right solution to do this ??
thanks in advance..
Use the sqlcmd.exe command in your batch file. (MSDN Reference: http://msdn.microsoft.com/en-us/library/ms162773.aspx)
for example