SQL statements (a couple of tables together to query, get the first few to the more than 10 data):
1. If there are a,b,c,d four tables, a,b,c,d are linked together as follows: The ((A Inner join B By A.Id =B.AId) Inner join C By B.Id =C.BId)Inner join D By C.Id =D.CId Where 条件一 AND 条件二... ;
above is sorted by time. Get 11th through 20th data from. How should SQL statements be written?
Reply content:
1. If there are a,b,c,d four tables, a,b,c,d are linked together as follows: The ((A Inner join B By A.Id =B.AId) Inner join C By B.Id =C.BId)Inner join D By C.Id =D.CId Where 条件一 AND 条件二... ;
above is sorted by time. Get 11th through 20th data from. How should SQL statements be written?
Mysql:
SELECT * FROM (select: (A Inner join B by a.id =b.aid) Inner join C by b.ID =c.bid) Inner join D by C.id =d.cid Wh ere condition one and condition two ...) As Table LIMIT 11,10
The above is the SQL statement (several tables in a joint query, get the first few to the more than 10 data) of the content, more relevant content please pay attention to topic.alibabacloud.com (www.php.cn)!