更新时间:2023-11-27 14:30:28
看看MSSQL的程序 sp_executesql 。
sp_executesql允许你创建一个包含要运行的SQL语句的动态字符串,所以你应该能够合并你的动态表名进入SQL语句。
希望它有所帮助。
Have a look at MSSQL's procedure sp_executesql.
sp_executesql allows you create a dynamic string containing the SQL statement to run, so you should be able to incorporate you dynamic table name into the SQL statement.
Hope it helps.
我不知道表副本,
但您可以从第一个读取数据并将读取的数据插入第二个表格。
读一个{
将数据放入数组中。
}
将数据插入第二个表格
用于循环。
i dont know about table copy,
but you can read data from first one and insert the read data to the second table.
read one{
put data in an array.
}
insert data to the second table
use for loop.