How can I select from list of values in SQL Server

后端 未结 14 1894
隐瞒了意图╮
隐瞒了意图╮ 2020-11-28 18:08

I have very simple problem that I can\'t solve. I need to do something like this:

select distinct * from (1, 1, 1, 2, 5, 1, 6).

Anybody can

14条回答
  •  不知归路
    2020-11-28 18:51

    If you need an array, separate the array columns with a comma:

    SELECT * FROM (VALUES('WOMENS'),('MENS'),('CHILDRENS')) as X([Attribute])
    ,(VALUES(742),(318)) AS z([StoreID])
    

提交回复
热议问题