MySQL Stored Procedure with Multiple Select statements From Different Tables

后端 未结 4 526
萌比男神i
萌比男神i 2021-01-26 05:33

I\'m trying to do multiple selects from different tables in a mysql stored procedure as follows

DELIMITER //  
CREATE PROCEDURE `NovemberSummary`(IN `branch` VA         


        
4条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-26 05:45

    CREATE PROCEDURE get_data ()
    BEGIN
      SELECT Code, Name, Population, Continent FROM Country
        WHERE Continent = 'Oceania' AND Population < 10000;
      SELECT Code, Name, Population, Continent FROM Country
        WHERE Continent = 'Europe' AND Population < 10000;
      SELECT Code, Name, Population, Continent FROM Country
        WHERE Continent = 'North America' AND Population < 10000;
    END;
    

提交回复
热议问题