Combine multiple sql statements to execute, and the returned results are displayed in one search result. UNION ALL

 

SELECT ID,Name FROM table_name1 where ID=1

UNION ALL      

SELECT ID,Name FROM table_name1 where ID=2

 

 

UNION ALL unit, union

SELECT ID,Name FROM table_name1 where ID=1

UNION ALL      

SELECT ID,Name FROM table_name1 where ID=2

 

 

UNION ALL unit, union

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325129241&siteId=291194637