MySQLæ¹è¨ã«ã¯MINUSã¨ãEXCEPTãç¡ãã®ã§ãéåã®å·®åã表ç¾ããã®ãæå¤ã¨é¢åãããã大æµã®å ´åãç¸é¢ãµãã¯ã¨ãªã§NOT EXISTSã使ã£ãSQLãæ¸ããã¨ã«ãªãã ä¸è¬å¾æ¥å¡ã示ãemployeeã¨ãªã¼ãã¼è·ã示ãleaderã¨ããäºç¨®é¡ã®ãã¼ãã«ãããã¨ããã CREATE TABLE employee ( id INT NOT NULL, PRIMARY KEY(id) ); CREATE TABLE leader ( id INT NOT NULL, PRIMARY KEY(id) ); employeeã«ã¯leaderã®ä¸èº«ãå«ã¾ãã¦ããã¨ããããã¦åé¡ãemployeeã§ã¯ããããleaderã§ã¯ãªãidãæ´ãåºãããã employeeéåããleaderéåãå¼ããã¨ãã§ããã°ã該å½ã®id群ãæ´ãåºããã
{{#tags}}- {{label}}
{{/tags}}