What you are looking for is this
SELECT SQL_CALC_FOUND_ROWS A.ID, A.NAME, B.ID, B.NAME
FROM table1 A
JOIN table2 B ON ( A.ID = B.TABLE1_ID )
WHERE
cond1, cond2, ..., condN
LIMIT 10
SELECT FOUND_ROWS();
More Related Contents:
- In SQL Server how to get the count of child if both parent and child are available [closed]
- MySQL select 10 random rows from 600K rows fast
- Get a list of dates between two dates
- How to change max_allowed_packet size
- Simulate lag function in MySQL
- What does character set and collation mean exactly?
- MySQL Split Comma Separated String Into Temp Table
- Get record counts for all tables in MySQL database
- Query to get all rows from previous month
- Use MySQL spatial extensions to select points inside circle
- Why can’t a text column have a default value in MySQL?
- In SQL, is it OK for two tables to refer to each other?
- mysql transaction – roll back on any exception
- MySQL create stored procedure syntax with delimiter
- How can I speed up a MySQL query with a large offset in the LIMIT clause?
- Modeling Product Variants
- How do I find which transaction is causing a “Waiting for table metadata lock” state?
- MySQL LIKE query with underscore
- ERROR 2013 (HY000): Lost connection to MySQL server at ‘reading authorization packet’, system error: 0
- Compare only day and month with date field in mysql
- mysql, ifnull vs coalesce, which is faster?
- Pass parameter to MySQL script command line
- MySQL delimiter syntax error
- Can a MySQL query turn rows into columns?
- MySQL – Meaning of “PRIMARY KEY”, “UNIQUE KEY” and “KEY” when used together while creating a table
- GRANT with database name wildcard in MySQL?
- Using SUM on FLOAT data
- Duplicate entry for key ‘group_key’
- SQL query with avg and group by
- How can I rebuild indexes and update stats in MySQL innoDB?