题目一可使用union。
select * from pages where url like ‘%url%'
union
select * from pages where url like ‘%title%'
union
select * from pages where url like ‘%body%'
这样就可以依次排列了。
问题太多了 都晕过去了
说说第二题吧
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')
我来回答第4题
select * from test_table t not exists
(select 1 from test_table t1 where t1.name=t.name and t1.lastlogno