Hello, I am trying to automate my history tracking procedure in MySQL. The procedure should update the table and create another, using uid as the name.
CREATE PROCEDURE `InsertQueryStore`( u VARCHAR(128), ID INT, q VARCHAR(1024) )
BEGIN
INSERT INTO querystore(`qID`, `qstring`, `user`) VALUES(ID, q, u);
END;
then I would like to name:
Call InsertQueryStore("myname", 100, "select * from mydb.table limit 10")
What is the correct way to use the varchar variable in a procedure?
Thanks in advance. Arman.
Arman source
share