我开始学习数据库,现在我只学习关系代数并遇到问题。如下表所示:
R1 = {(Jon, Smith, 24, British, Single, UK, Guitarist),
(Jon, Maynard, Smith, 74, British, Widowed, UK, Scientist),
(Jon, Travolta, 50, American, Married, USA, Plumber),
(Katy, Pierce, 23, UK, Single, Caiman Island, unknown)}
With Schema = {Name, Surname, Age, Nationality, Status, Country, Job}
如何使用自笛卡尔/交叉运算计算R4 = R1 X R1?
答案 0 :(得分:1)
尝试SELECT *
FROM R1
CROSS JOIN R1 tab2
electron-builder
答案 1 :(得分:1)
只需从没有连接的两个表中选择
Select r1.*,r2.* From r1,r1 r2