From 0a60c93ef6d7e47f4ae0bb233d589e9156a57903 Mon Sep 17 00:00:00 2001 From: 423A35C7 <609514299@qq.com> Date: Sun, 20 Oct 2024 16:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E7=B3=BB=E7=BB=9F?= =?UTF-8?q?=E5=8E=9F=E7=90=86=E4=B8=8E=E5=AE=9E=E8=B7=B5=E2=80=94=E2=80=94?= =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E5=9B=9B=E6=AC=A1=E4=BD=9C=E4=B8=9A?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 原先的表达式含义是只能购买RS或CS而没买别的,新的含义才是同时购买RS和CS。 --- 数据库系统原理与实践/平时作业/第四次作业.tex | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/数据库系统原理与实践/平时作业/第四次作业.tex b/数据库系统原理与实践/平时作业/第四次作业.tex index e32e4fd..d9baded 100644 --- a/数据库系统原理与实践/平时作业/第四次作业.tex +++ b/数据库系统原理与实践/平时作业/第四次作业.tex @@ -198,16 +198,17 @@ from (select account.ACCOUNT_ID, OPEN_BRANCH_ID, AVAIL_BALANCE, max_avail_balanc \begin{minted}{SQL} select individual.ID_NUMBER 身份证号, concat(individual.LAST_NAME, individual.FIRST_NAME) 姓名全名 from individual -where not exists(select * - from account - where PRODUCT_CD != 'CS' and PRODUCT_CD != 'RS' and account.CUST_ID = individual.CUST_ID); +where not not exists(select * from account where PRODUCT_CD = 'CS' and account.CUST_ID = individual.CUST_ID) + and not not exists(select * from account where PRODUCT_CD = 'RS' and account.CUST_ID = individual.CUST_ID); \end{minted} \begin{csv} ,身份证号,姓名全名 -1,41032619780815564X,许文强 -2,370900196802069281,何婕 -3,320623197108259227,施珊珊 -4,321111197703197600,孔庆东 +1,350403198204222299,尤青 +2,41032619780815564X,许文强 +3,370900196802069281,何婕 +4,450881196612220768,吕东 +5,320623197806169227,严匡 +6,320623197108259227,施珊珊 \end{csv} }