Heim  >  Fragen und Antworten  >  Hauptteil

Gibt es eine Möglichkeit, die richtigen Bedingungen zu erhalten? Beide Optionen in MYSQL erzielen nicht die erwarteten Ergebnisse

SELECT cstmr_type FROM add_vehicle
WHERE cstmr_type = 'Visitor' AND cstmr_type = 'Hospital';

SELECT cstmr_type FROM add_vehicle
WHERE cstmr_type = 'Visitor' & 'Hospital';

P粉394812277P粉394812277379 Tage vor505

Antworte allen(1)Ich werde antworten

  • P粉322918729

    P粉3229187292023-09-16 11:29:38

    尝试使用IN关键字

    SELECT cstmr_type FROM add_vehicle WHERE cstmr_type IN ('访客', '医院')

    Antwort
    0
  • StornierenAntwort