如何根据变量的值建立表名不同而结构相同的表? Exec('Select * into '+@newTable + ' from oldTable ') 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 declare @newtable varchar(20)exec('select * into '+@newtable+' from tablename')go 按照上述编的程序,执行时出错,请予指点。程序如下:<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%><!--#include file="conn.asp"--><%'复制数据表结构Dim newTablenewTable=111Const adCmdText=1set comm=server.createobject("adodb.command")comm.ActiveConnection=conncomm.CommandText="'select * into '+@newTable+' from RationInfo'"comm.CommandType=adCmdTextcomm.execute%> comm.CommandText="'select * into '+newTable+' from RationInfo'" comm.CommandText="select * into "+newTable+" from RationInfo" comm.CommandText="select * into " & newTable & " from RationInfo" 请教 SQL语句 子查询的问题(请帮忙)? 关于SQLSERVER JOB 报错的问题,请高手指点 MS-TDS协议解析变量替换RPC协议 请问怎样去取小数点后面的数字啊?求助!!!!! 高手分析下,为嘛这条语句在SQL SERVER中不能运行 远程访问SQL sql 2005 区间数据统计 我从A库将数据复制到B库,为什么B库的表的主键却自动取消了??? 一个多用户的问题???? SQL如何查IP段 急!!这个存储过程怎么写(在线等待)
exec('select * into '+@newtable+' from tablename')
go
<!--#include file="conn.asp"-->
<%
'复制数据表结构
Dim newTable
newTable=111
Const adCmdText=1
set comm=server.createobject("adodb.command")
comm.ActiveConnection=conn
comm.CommandText="'select * into '+@newTable+' from RationInfo'"
comm.CommandType=adCmdText
comm.execute
%>