Home > database >  Consult: multi-table query methods, (more than one field string)
Consult: multi-table query methods, (more than one field string)

Time:09-18

Whether to ask, how to query table 1 electives, as table 2 group
Table 1 within a field, multiple strings, query whether elective courses and grouping of courses are consistent,

CodePudding user response:

Select count (*) from table 1 where electives not in (select group from table 2);
Large amount of data words with left join better.
Greater than zero is not consistent,

CodePudding user response:

Select elective courses from the where elective courses in table 1 (select
Grouping the from table 2.) this is to find out in the elective courses are grouped in table 2, and furthermore, using inline
  • Related