哪位大虾给解决一下SQL 数据库语言查询语句

2024-12-28 06:02:59
推荐回答(3个)
回答1:

题目一可使用union。
select * from pages where url like ‘%url%'
union
select * from pages where url like ‘%title%'
union
select * from pages where url like ‘%body%'
这样就可以依次排列了。

回答2:

问题太多了 都晕过去了
说说第二题吧
1、select S#,SN
from S
where S# in (select S# from SC where C# in (select C# from C where CN='税收基础') )

2、select SN,SD
from S
where S# in (selct S# from SC where C#='C2')

3、select SN,SD
from S
where S# in (selct S# from SC where C#<>'C5')

回答3:

我来回答第4题

select * from test_table t not exists
(select 1 from test_table t1 where t1.name=t.name and t1.lastlogno