实例 SQL 逻辑运算符 AND

x
 
SELECT * FROM Customers
WHERE City = 'London' AND Country = 'UK';
        
                    

输出结果

CustomerIDCustomerNameContactNameContactTitleAddressCityRegionPostalCodeCountryPhoneFax
AROUTAround the HornThomas HardySales Representative120 Hanover Sq.LondonWA1 1DPUK(171) 555-7788(171) 555-6750
BSBEVB's BeveragesVictoria AshworthSales RepresentativeFauntleroy CircusLondonEC2 5NTUK(171) 555-1212
CONSHConsolidated HoldingsElizabeth BrownSales RepresentativeBerkeley Gardens 12 BreweryLondonWX1 6LTUK(171) 555-2282(171) 555-9199
EASTCEastern ConnectionAnn DevonSales Agent35 King GeorgeLondonWX3 6FWUK(171) 555-0297(171) 555-3373
NORTSNorth/SouthSimon CrowtherSales AssociateSouth House 300 QueensbridgeLondonSW7 1RZUK(171) 555-7733(171) 555-2530
SEVESSeven Seas ImportsHari KumarSales Manager90 Wadhurst Rd.LondonOX15 4NBUK(171) 555-1717(171) 555-5646