如何在SQL中的两列之间添加列 [英] How to add column between two column in sql
本文介绍了如何在SQL中的两列之间添加列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的朋友,
如何在sql中的两列之间添加列
问候,
AP
Dear Friends,
How to add column between two column in sql
Regards,
AP
推荐答案
您实际上无法做到这一点-您必须构建一个临时表,将信息转移过来,然后从该临时表中重建旧表. .
话虽这么说,列顺序仍然没有关系-除非您使用"SELECT * FROM ..."并依赖于返回数据中的列号,否则这首先是一件非常非常愚蠢的事情! />
您要达到什么目的,以为您认为这是必要的并且是个好主意?
You can''t actually do that - you would have to build a temporary table, transfer the information over, and then rebuild the old table from the temporary.
Having said that, column order should not matter anyway - unless you are using "SELECT * FROM ..." and relying on column number in the returned data, which is a very, very silly thing to do in the first place!
What are you trying to achieve that you think this is necessary, and a good idea?
请参阅以下内容:
http://blog.sqlauthority.com /2008/04/08/sql-server-change-order-of-column-in-database-tables/ [
Refer to this:
http://blog.sqlauthority.com/2008/04/08/sql-server-change-order-of-column-in-database-tables/[^]
使用 ALTER TABLE [
这篇关于如何在SQL中的两列之间添加列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文