使这种查询动态化
我正在执行一个查询来创建一个在 SQL 中包含两个元素的表
SELECT [att1]
,[att2]
,[att3]
,[att4]
,[att5]
,[att6]
,[att7]
,[att8]
,[att9]
,[att10]
,att11 = att1,
att12 = att2,
att13 = att3,
att14 = att4,
att15 = att5,
att16 = att6,
att17 = att7,
att18 = att8,
att19 = att9,
att20 = att10
INTO Table_20
FROM Table_10;
,使此动态化的最佳方法是什么?如果我有一个包含 30 atts
的表,请使用 30 创建一个表* 2
atts(双倍大小)?
I am making a query to create a table which has twice elements in SQL
SELECT [att1]
,[att2]
,[att3]
,[att4]
,[att5]
,[att6]
,[att7]
,[att8]
,[att9]
,[att10]
,att11 = att1,
att12 = att2,
att13 = att3,
att14 = att4,
att15 = att5,
att16 = att6,
att17 = att7,
att18 = att8,
att19 = att9,
att20 = att10
INTO Table_20
FROM Table_10;
What would be the best way to make this dynamic and if I have a table with 30 atts
, make a table with 30 * 2
atts (double the size)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)