从表A复制到表B. [英] copy from table A to table B
本文介绍了从表A复制到表B.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
亲爱的专家,
1.想要在MS的存储过程中从表A到表B复制SQL SERVER 2008 。
表B是表A的复制品。
2.需要追加以下期限
a。本月
b。年度
c。日期
应附加到表B的复制表格。
如何完成上述工作。
谢谢
解决方案
< blockquote>尝试:
INSERT INTO TableB SELECT *,GETDATE() FROM TableA
一个非常简单的谷歌会找到你这个: http://www.w3schools.com/sql/sql_insert_into_select.asp [ ^ ]
>
Dear expert,
1. Want to copy from TABLE A TO TABLE B in a stored procedure in MS SQL SERVER 2008.
table B is a replica of table A.
2. Need to append the period the following
a. The Month
b. The Year
c. The Date
should be appended to the copied table to Table B.
How do you accomplish the above .
Thanks
解决方案
Try:
INSERT INTO TableB SELECT *, GETDATE() FROM TableA
A very simple google would have found you this: http://www.w3schools.com/sql/sql_insert_into_select.asp[^]
这篇关于从表A复制到表B.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文