How to join two unrelated tables in sql

后端 未结 4 1203
我在风中等你
我在风中等你 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:34

    You can use the Cartesian Product of the two tables as follows:

    SELECT * FROM Formulas, Context
    

    This would result in M * N rows.

提交回复
热议问题