关系代数 现有表test内有属性(t1,t2,t3)SQL语句:select *from test as A,test
来源:学生作业帮 编辑:百度作业网作业帮 分类:综合作业 时间:2024/06/24 18:42:09
关系代数
现有表test内有属性(t1,t2,t3)
SQL语句:
select *
from test as A,test as B
where A.t1 = B.t3
该语句写成关系代数表达式时,本人对 “自身连接时取别名” 感到困难
感谢您的回答,我希望得到的是关系代数表达式,选择、投影、连接...这些运算,
现有表test内有属性(t1,t2,t3)
SQL语句:
select *
from test as A,test as B
where A.t1 = B.t3
该语句写成关系代数表达式时,本人对 “自身连接时取别名” 感到困难
感谢您的回答,我希望得到的是关系代数表达式,选择、投影、连接...这些运算,
![关系代数 现有表test内有属性(t1,t2,t3)SQL语句:select *from test as A,test](/uploads/image/z/8884650-66-0.jpg?t=%E5%85%B3%E7%B3%BB%E4%BB%A3%E6%95%B0+%E7%8E%B0%E6%9C%89%E8%A1%A8test%E5%86%85%E6%9C%89%E5%B1%9E%E6%80%A7%EF%BC%88t1%2Ct2%2Ct3%EF%BC%89SQL%E8%AF%AD%E5%8F%A5%EF%BC%9Aselect+%2Afrom+test+as+A%2Ctest)
2种解决办法
1.select *
from test
where t1 in (select t3 from test)
2.select *
from test a
where exists (select * from test b where a.t1=b.t3)
貌似不用连接,好像就这个意思select * from test where t1=t3
写成关系代数是
π testt1,t2,t3(б testt1=б testt2)
符号不好打
1.select *
from test
where t1 in (select t3 from test)
2.select *
from test a
where exists (select * from test b where a.t1=b.t3)
貌似不用连接,好像就这个意思select * from test where t1=t3
写成关系代数是
π testt1,t2,t3(б testt1=б testt2)
符号不好打
关系代数 现有表test内有属性(t1,t2,t3)SQL语句:select *from test as A,test
select count(*) as total from 'test' order by id desc
test
SQL语句理解 select * from B where (select count(1) as num from A
append from test sdf
test this is a test a new test
on a test or in a test?
A Math test
study for a test
on a test
test a good time
take a test