Select* fromfruit# Query All the contents of this tableSelectIds,name fromfruit# query sequence and name these two columnsSelect* fromFruitwhereIds='k007'#查找k007信息Select* fromFruitwherePrice='2.4' andSource='Yantai'Select* fromCarwhereName like 'Audi%'Select* fromCarwhereName like 'Audi _%' Select* fromChinastateswhereAreaName like '__ Area%'#%for as long as the data contains this field to find out, _ for a position sort querySelect* fromChinastatesOrder byAreaCodedescSelect* fromFruitOrder byPrice,source Statistical QuerySelect Count(*) fromNationSelect Count(AreaCode) fromchinastatesSelect Max(Price) fromcar;Select min(Price) fromcar;Select avg(Price) fromcar;Select sum(Price) fromcar;Select Max(Price),min(Price),avg(Price) fromCar #如果要一起查的话只有这样分组查询SelectCode,brand,Count(*) fromCarGroup byBrandSelectPriceCount(*),Max(Price) fromFruitGroup byPrice Paging QuerySelect * fromCar limit3,5#跳过几条数据取几条
Simple query Exercise