How can I join these two select statements?

Eixhani

First statement

SELECT * FROM `file` WHERE Region = 'x' AND level > 2 ORDER by id DESC LIMIT 0,6

Second statement

SELECT * FROM `file` WHERE Region = 'x' AND level < 3 ORDER by id DESC LIMIT 0,6
Edilson Borges

I don't know for sure if this is what you're looking for, but you can UNION them.

(SELECT * FROM `file` WHERE Region = 'x' AND level > 2 ORDER by id DESC LIMIT 0,6)
UNION
(SELECT * FROM `file` WHERE Region = 'x' AND level < 3 ORDER by id DESC LIMIT 0,6)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to join two SELECT statements?

From Dev

How can I join these two select queries into one query?

From Dev

How can I combine two select statements into one table with two seperate columns?

From Dev

How to join two sql select statements side by side

From Dev

How can I combine these two statements?

From Dev

How to join two sql statements

From Dev

SQL join two SELECT statements - fairly easy

From Dev

Join Two Select Statements With Different Columns And Condition

From Dev

how can I join two regex into one?

From Dev

How can I Join Two Query

From Dev

How can I join two tables with REALM

From Dev

How can I use Dapper with a SELECT stored procedure containing an INNER JOIN between two tables?

From Dev

How do I join two tables and then select two different columns?

From Dev

How can I work around Excel crashing with certain SELECT statements?

From Dev

How can I combine these two if/else statements for different results?

From Dev

How can I return ScopeIdentity in a query of two Insert statements

From Dev

How can I combine two If Statements in PHP to block access to a URL?

From Dev

How can I join two join queries into one?

From Dev

How I can join two by two column using shell

From Dev

Join two MySQL SELECT statements containing one WHERE clause

From Dev

Perform JOIN in SQLITE on two SELECT statements from the same table

From Dev

How to combine two select statements in SQL Server

From Dev

How to shuffle the results of two MySQL SELECT statements

From Dev

How to combine two SQL SELECT statements in one?

From Dev

How to combine two select statements in c++

From Dev

Two IF statements and join MYSQL

From Dev

Can I have two initializing statements in a "for" loop?

From Dev

Can I merge these two if-statements?

From Dev

How can I select the second minimal value within a inner join?

Related Related

  1. 1

    How to join two SELECT statements?

  2. 2

    How can I join these two select queries into one query?

  3. 3

    How can I combine two select statements into one table with two seperate columns?

  4. 4

    How to join two sql select statements side by side

  5. 5

    How can I combine these two statements?

  6. 6

    How to join two sql statements

  7. 7

    SQL join two SELECT statements - fairly easy

  8. 8

    Join Two Select Statements With Different Columns And Condition

  9. 9

    how can I join two regex into one?

  10. 10

    How can I Join Two Query

  11. 11

    How can I join two tables with REALM

  12. 12

    How can I use Dapper with a SELECT stored procedure containing an INNER JOIN between two tables?

  13. 13

    How do I join two tables and then select two different columns?

  14. 14

    How can I work around Excel crashing with certain SELECT statements?

  15. 15

    How can I combine these two if/else statements for different results?

  16. 16

    How can I return ScopeIdentity in a query of two Insert statements

  17. 17

    How can I combine two If Statements in PHP to block access to a URL?

  18. 18

    How can I join two join queries into one?

  19. 19

    How I can join two by two column using shell

  20. 20

    Join two MySQL SELECT statements containing one WHERE clause

  21. 21

    Perform JOIN in SQLITE on two SELECT statements from the same table

  22. 22

    How to combine two select statements in SQL Server

  23. 23

    How to shuffle the results of two MySQL SELECT statements

  24. 24

    How to combine two SQL SELECT statements in one?

  25. 25

    How to combine two select statements in c++

  26. 26

    Two IF statements and join MYSQL

  27. 27

    Can I have two initializing statements in a "for" loop?

  28. 28

    Can I merge these two if-statements?

  29. 29

    How can I select the second minimal value within a inner join?

HotTag

Archive