I'm querying a big mysql database with only read privileges, and I'd like to set some slow query results to a variable, 'foo', so I can use them again in other queries.
Basically, I want to have a variable for a cumbersome subquery, so I can reuse…
Ok so i'm working on triggers, and it tells me it(MySQL workbench 5.2) doesn't recognize this variable.
*Error Code: 1193. Unknown system variable error_msg_3*
I think it would be correct using it in a trigger, please help me
CREATE TRIGGER…
I'm new using mysql stored procedure. There is error that I can't fix
this is my code
DELIMITER $$
CREATE PROCEDURE `bankdb`.`charge` ()
BEGIN
DECLARE idcust_val INT;
DECLARE balance_val FLOAT;
DECLARE productCd_val VARCHAR(10);
DECLARE loop_cntr…
I'm trying to create a trigger where if someone says they have a discount code, the purchaseprice of their ticket drops by $10.
I ran the code:
CREATE TRIGGER alterPurchasePrice AFTER INSERT ON CustomerOrders FOR EACH ROW
BEGIN IF DiscountCode =…
I am trying to create a trigger in mysql using the following:
CREATE TRIGGER ins_daft BEFORE INSERT ON jos_ezrealty
FOR EACH ROW BEGIN
SET preschool = livingarea*10.76391041671
END;
When I do I get the following error:
Error
SQL query:
CREATE…
So, i have to migrate some data, the query is:
SELECT * FROM ldf.vin_EntePublicoLDF WHERE ejr_id = 2019;
and i have to take those data but set "2020"
I try with:
SET vin_EntePublicoLDF.ejr_id = 2020
INSERT INTO ldf.vin_EntePublicoLDF
SELECT * FROM…
I have taken a dump from my mysql database on my own server (version 5.0.67) and I have tried to import it to my other database (version 5.0.54). However, I get the error:
ERROR 1193 (00000) at line 23: Unknown system variable…
How can I import basehansard.sql.bz2 into MySQL? I tried extracting the file so that it was basehansard.sql (text file), but the data import still had an error (ERROR 1193 "Unknown system variable 'statement_timeout'").
The data source is…