1 :普通SQL语句可以用exec执行
Select * from tableName exec('select * from tableName') exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N
查看更多关于SQLSERVER中构建执行动态SQL语句的方法的详细内容...
声明:本文来自网络,不代表【好得很程序员自学网】立场,转载请注明出处:http://haodehen.cn/did32380
1 :普通SQL语句可以用exec执行
Select * from tableName exec('select * from tableName') exec sp_executesql N'select * from tableName' -- 请注意字符串前一定要加N
查看更多关于SQLSERVER中构建执行动态SQL语句的方法的详细内容...