Questions tagged [mysql-routines]

20 questions
0
votes
1 answer

MySQL Stored Procedure - IF EXISTS ... THEN returning unexpected result

The below is my Stored Procedure(Routine) to check whether or not a user with Username(input) exists in the database. Inside the database, I already have a user with Username - 'dev'. However, when I ran the below routine, it returned me with res =…
DriLLFreAK100
  • 1,575
  • 2
  • 16
  • 26
0
votes
1 answer

MySQL - Stored Procedures syntax issue

CREATE PROCEDURE `usp_GetUserValidation` (IN `@Username` VARCHAR(255), IN `@Password` VARCHAR(50), OUT `@ErrorCode` INT) LANGUAGE SQL NOT DETERMINISTIC CONTAINS SQL SQL SECURITY DEFINER COMMENT 'To validate user…
DriLLFreAK100
  • 1,575
  • 2
  • 16
  • 26
0
votes
1 answer

mysql procedure error in IF..THEN statement

So I have this procedure to calculate freights. I need to select two values from matching row. And according to condition based on in_quantity, out of these two previously selected values one will be set to out_total. DELIMITER $$ CREATE PROCEDURE…
Gimali
  • 777
  • 3
  • 12
  • 21
0
votes
0 answers

Store Procedure - SLOW insert + possible VARs conflict

I'm working on a messaging system that basically consists of two tables: CONVERSATIONS and MESSAGES. The procedure checks if there is a conversation, and if there is it saves the conversation ID into a VAR and uses that for the message insert. IF…
franks
  • 61
  • 1
  • 9
-1
votes
2 answers

get Mysql Event status

I can get event in mysql by SHOW EVENTS LIKE 'e29' but it is giving all information. it is like select * from .... My need is that i want to get the STATUS of a particular event
Govind Singh
  • 15,282
  • 14
  • 72
  • 106
1
2