是否可以进一步格式化选择星号?
我有一个有 75 列的长表,我正在输入测试数据,但很难在网络表单中输入
我已经输入了一行。
我想在表中复制十次。
Insert into tbl01
select * from tbl01
代码不起作用,因为身份列已打开,所以我想做的就像
Select * - (column1) from tbl01
我问我的同事一样,她告诉她不知道这样的事情存在。
注意:我不想做——
选择第 1 列、第 2 列...直到第 75 列
I have a long table with 75 columns, I am entering test data and it is difficult to enter in the web form
I have already entered a row.
I want to copy it ten times in the table .
Insert into tbl01
select * from tbl01
code does not work because identity column is on, so I want to do like
Select * - (column1) from tbl01
I asked my colleague and she told she dont know that such a thing exists.!!!
Note: I dont want to do --
select col1, col2...till col 75
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
不,你不能那样做。
在“Sql Server Management Studio”中,您可以右键单击表并选择“将表脚本为”> “插入到”为您生成列名称。
No, you can't do that.
In "Sql Server Management Studio", you can right click a table and select "Script table as" > "Insert to" to generate the column names for you.
您应该能够在 sys.columns 表的帮助下组合一些动态 sql。
不过,说实话,我只会将其用作 SSMS“脚本表作为”功能的另一个选项。您实际上应该创建一些 sql 并将其保存在某个地方以供重用。
You should be able to hack together some dynamic sql with the help of the sys.columns table.
Though, to be honest, I'd use this only as another option to the SSMS "Script table as" function. You should really just create a some sql and save it somewhere for reuse.