mysql stored procedure error (1172, 'Result consisted of more than one row')

后端 未结 1 1285
遥遥无期
遥遥无期 2021-01-07 00:02

When trying to run the following stored procedure from django, I get an OperationError (1172, \'Result consisted of more than one row\') Any idea what I might be doing wrong

相关标签:
1条回答
  • 2021-01-07 00:07

    Your SELECT...INTO queries give result sets with more then one record. The WHERE filters are incorrect - they compare two the same values StoreID = storeId. Rename IN storeId int parementer to another name. For example - IN storeId_param int

    The query will be like this -

    SELECT S1000IncreaseChoices INTO changeType FROM store_store WHERE StoreID = storeId_param;
    
    0 讨论(0)
提交回复
热议问题