How to join two unrelated tables in sql

后端 未结 4 1175
我在风中等你
我在风中等你 2021-01-03 22:07

I have two tables:

Table 1: Formulas

FormulaId    Formula Text
1            [Qty] * [Rect]
2            [Qty] * [Al]
3            [Mt] * [Cat]  
         


        
4条回答
  •  生来不讨喜
    2021-01-03 22:33

    Did you try CROSS APPLY:

    select *
    from context
    cross apply formulas
    order by contextid
    

    See SQL Fiddle With Demo

提交回复
热议问题