如何快速生成多条这类语句?
比如某个数据库中有20个表。
有什么方法,能快速生成20条这样select语句?
select top 10 * from 表1
select top 10 * from 表2
.
.
.
slect top 10 * from 表20
[解决办法]
- SQL code
use CSDNgoselect 'select top 10 * from ' + quotename(name)from sys.tableswhere type = 'u'
发布时间: 2012-06-14 16:00:31 作者: rapoo
如何快速生成多条这类语句?
比如某个数据库中有20个表。
有什么方法,能快速生成20条这样select语句?
select top 10 * from 表1
select top 10 * from 表2
.
.
.
slect top 10 * from 表20
[解决办法]
use CSDNgoselect 'select top 10 * from ' + quotename(name)from sys.tableswhere type = 'u'