当前位置: 代码迷 >> Sql Server >> 取出记录,该如何处理
  详细解决方案

取出记录,该如何处理

热度:90   发布时间:2016-04-27 18:41:36.0
取出记录
exec ('select [email protected]+' from [email protected])

1)@strvalue 是一个字符串字段
2)@strfrom 是where语名

像这样的语名如果要在存储过程取出它的记录,应怎么做


------解决方案--------------------
这不已经取出来了吗?
------解决方案--------------------
引用楼主 kdymh 的帖子:
exec ('select [email protected]+' from [email protected])

1)@strvalue 是一个字符串字段
2)@strfrom 是where语名

像这样的语名如果要在存储过程取出它的记录,应怎么做


------解决方案--------------------
SQL code
--表名呢??exec ('select [email protected]+' from 表名 [email protected])
------解决方案--------------------
引用楼主 kdymh 的帖子:
exec ('select [email protected]+' from [email protected])

1)@strvalue 是一个字符串字段
2)@strfrom 是where语名

像这样的语名如果要在存储过程取出它的记录,应怎么做

------解决方案--------------------
探讨
引用楼主 kdymh 的帖子:
exec ('select [email protected]+' from [email protected])

1)@strvalue 是一个字符串字段
2)@strfrom 是where语名

像这样的语名如果要在存储过程取出它的记录,应怎么做


将数据插入一临时表,然后从临时表取数据.
此处临时表的意思为临时使用的表.
  相关解决方案