软件下载吧文章资讯

分类分类

SQL开发知识:SQL SERVER 中执行动态SQL语句的方法

2024-03-04 00:33作者:下载吧

1 :普通SQL语句可以用exec执行

Select * from tableName
exec(‘select * from tableName’)
exec sp_executesql N’select * from tableName’ — 请注意字符串前一定要加N

展开全部

相关文章

说两句网友评论
    我要跟贴
    取消