SQL > SQL????? > And Or

? ????? WHERE ?????? ???? ???? ???? ???? ???? ????? ???????. ??? ????(? ???? ?? ??)??? ??????? ????. ??? ???? ?? ?? ???? ??? ???? AND ? OR ? ??? ????????. ???SQL???? ??? ??? ???? ???? ????.

??? ??? ??? ??? ????:

SELECT "???"
FROM "???"
WHERE "????"
{[AND|OR] "????"}+;

{}+ ??{}?? ??? ?? ?? ??? ?????. ???? ??? AND ??? ?? ?? ? OR ??? ?? ??? ??? ?? ?? ??? ???? ????? ?????. ??? ( )? ??? ?? ??? ???? ????.

?? ?? Store_Information ???? Sales ? $1,000 ?? ??Sales ? $500 ? $275 ??? ???? ??? ??

Store_Information ??
Store_NameSalesTxn_Date
Los Angeles150005-Jan-1999
San Diego25007-Jan-1999
San Francisco30008-Jan-1999
Boston70008-Jan-1999

??? ?????.

SELECT Store_Name
FROM Store_Information
WHERE Sales > 1000
OR (Sales < 500 AND Sales > 275);

??:

Store_Name
Los Angeles
San Francisco

SQL IN >>
?


Copyright © 2021   1keydata.com   All Rights Reserved