CREATE TABLE #yt (VendorID INT, Emp1 INT, Emp2 INT, Emp3 ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Emacs

Q&A for those using, extending or developing Emacs

CREATE TABLE #yt (VendorID INT, Emp1 INT, Emp2 INT,  
    Emp3 INT, Emp4 INT, Emp5 INT);
   
INSERT INTO #yt VALUES (1,4,3,5,4,4);  

SELECT * FROM #yt;



select v.col
from #yt cross apply
     (values (Emp1), (Emp2), (Emp3), (Emp4), (Emp5)) v(col);

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results