MySQL Event Scheduler syntax for insert and delete -


I was wondering if you can tell me what's wrong with FF SQL statement:

  translate from transponder_logs to * Choose * where trans_log_id & lt; 150000; Remove from transponder_logs where trans_log_id & lt; 150000  

This statement was okay in SQL but when I used it on the Event Scheduler , it gives me a syntax error.

The error message was:

"You have an error in your SQL syntax, the manual that is close to compatible for your MySQL server version for correct syntax Use the check 'remove from transponder_logs where trans_log_id & lt; 150000 line3 "

required a custom DELIMITER whenever you define a code that has many executable statements; Not. And your code will be sent to the server with delimiter instruction. And before it gets the newly defined custom delimiter, compiles the server as the block code

what the document reads:

< Blockquote>

If you use the mysql client program to define a stored program, a problem occurs. By default, MySQL automatically recognizes a statement delimiter as a delimiter, so you must define the delimiter temporarily to pass the entire stored program definition to the server to generate mysql.

To redefine mysql delimiter, use the delimiter command .... delimiter has been modified to / / to complete the definition of a single statement In order to enable the server to pass, and then to restore; Enables this before starting the process; The process used in the body to be passed through the delimiter rather than being interpreted in the mysql server itself.

I believe your incident scheduler code is executed just like this without defining the delimiter .

Change it to the following:

  - Set new delimiter DELIMITER // - Include your event scheduler code block here - end the code block at the end, New delimiter - so that the server starts compiling the code - now reset the delimiter to the default DELIMITER;  

Refer to :


Comments

Popular posts from this blog

import - Python ImportError: No module named wmi -

Editing Python Class in Shell and SQLAlchemy -

c# - MySQL Parameterized Select Query joining tables issue -