1 / 1
MySQL Query for Employee-Pno Exclusion from a Selection
10 likes | 189 Vues
This document outlines a MySQL query that selects all employees (Essn) from a table TT while excluding specific employee-Pno combinations listed in another table ssn_pno. The query utilizes the division operator to filter out unwanted records efficiently. It also demonstrates how to handle distinct selections and subqueries to achieve the desired data retrieval, ensuring that only unique employees from T1 are selected based on the conditions outlined.
Télécharger la présentation
MySQL Query for Employee-Pno Exclusion from a Selection
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.
Content is provided to you AS IS for your information and personal use only.
Download presentation by click this link.
While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
During download, if you can't get a presentation, the file might be deleted by the publisher.
E N D
Presentation Transcript
MySQL Division operator • (SxT1)-R=>Select * from TT where (Essn,Pno) not in (select Essn,Pno from ssn_pno);//TT=SxT1; ssn_pno=R; • T2<=πY((SxT1)-R) • T<=T1-T2=>select distinct Essn from T1 where Essn not in (select Essn from T2);
More Related