DECLARE @val CHAR(50) SET @val = 'use Pubs select * from jobs ' exec @val
Why does this query does not work??
Select Answer:
string Use Pubs and select * from jobs should be concatenated with &
@val variable should have only one statement to execute
strings can not have queries
exec(@val) can be given
|