Oracle exists usage and My Sql limit offset usage

Oracle:

1. Execute the subquery first, and then execute the main query. When executing the subquery, suspend the main query, when the subquery is executed, store the results in a temporary table, and then execute the main query

select * from T1 where TI.a in (select T2.a from T2);

2. Execute the main query first, then execute the subquery until a match is found.     

select * from T1 where exists (select * from  T2 where T1.a = T2.a);

 In the Oracle query statement, the table after from is queried in top-down order, and the conditions after where are executed in bottom-up order.

My Sql:

1.select * from T1 where limit 1,3; ---The meaning of the first number after limit is: let this number be A, which means to start the query from the (A+1) record in the table, the second number The meaning represents the maximum total number of records for the query (because the number of rows of composite records in the table may be less than the total number of records)

2.select * from T1 where limit A offset B; -- the meaning of this statement is exactly the opposite of the meaning of the above statement, A represents the maximum total number of records in the query, (B+1) represents the first record from the table Inquire

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327040013&siteId=291194637