比较难的sql 语句 access数据库
发布网友
发布时间:2022-04-08 11:05
我来回答
共4个回答
热心网友
时间:2022-04-08 12:34
select ks_clss.[id],foldername,title from ks_clss,ks_proct where ks_clss.[id]=ks_proct.tid and foldername in(select foldername from ks_clss where [id]=20111)
这条语句的思路是这样,通过id先获得‘张三’,再通过‘张三’查出所有叫张三的,并且ks_clss表和ks_proct表的id跟tid相对应的所有记录,这样你就可以根据需要做删除了。
热心网友
时间:2022-04-08 13:52
1,select id from ks_clss where FolderName = (select foldername from ks_clss where id=20111)
2,select Title from KS_Proct where tid in (select id from ks_clss where FolderName = (select foldername from ks_clss where id=20111)
) and type = 6
热心网友
时间:2022-04-08 15:27
这个肯定没问题
SELECT t4.Title, t3.oID
FROM KS_Proct t4,
(SELECT t1.ID, t1.FolderName, t2.ID AS oID
FROM ks_clss t1, ks_clss t2
WHERE t1.FolderName = t2.FolderName AND t2.ID = 20111) t3
WHERE t4.Tid = t3.ID AND type = 6
热心网友
时间:2022-04-08 17:18
没表没法试,给你个思路,很简单啊...
select Title
from KS_Proct p
left join ks_clss c on c.ID=p.Tid
where Type=6