读书人

SQL存储过程添加有关问题

发布时间: 2012-05-06 16:15:43 作者: rapoo

SQL存储过程,添加问题
存储过程GetA可以查询到4个字段SELECT B1, C1, C2, C3
现在我用存储过程GetB添加数据INSERT INTO Orders(A, C1, C2, C3) VALUES('1',.....接下去我想直接执行GetA存储过程,但是我不要B1这个字段,只要C1,C2,C3这3个字段)
这个要怎么写?有人知道吗?

[解决办法]

SQL code
use tempdbinsert into #t(B1, C1, C2, C3)exec GetAselect C1, C2, C3 from #t 

读书人网 >SQL Server

热点推荐