看看这段代码:
DECLARE @bufferOrder INT = 1, @capacityOrder INT = 2, @priceOrder INT = 3, @angleSpeedOrder INT = 4
SELECT 'buffer', @bufferOrder
UNION
SELECT 'capacity', @capacityOrder
UNION
SELECT 'price', @priceOrder
UNION
SELECT 'angle_speed', @angleSpeedOrder
我可以在不使用临时表的情况下分配两个列名吗?
[INSERT INTO @#tempTabel (columnName1,columnName2) + above code]
像这样(伪代码):
above code +
AS columnName1,columnName2