Home > database >  About the stored procedure and error 1111
About the stored procedure and error 1111

Time:09-24

I want to know what is wrong with my program, a great god please help have a look at
The table is the purpose of the stored procedure orer_frequncy frequnsy update into user_id frequency
(Err), 1111 - Utilisation invalide DE la clause GROUP

 BEGIN 
DECLARE I int the DEFAULT 0;
DECLARE int f the DEFAULT 0;
DECLARE a int the DEFAULT 0;
Declare int b DEFAULT 0;
Declare c int the default 0;
The set I=1;
The set f=1;
Set a=0;
The set b=0;
The set c=COUNT (orer_frequncy. Id);
While iThe select user_id into a from orer_frequncy where user_id=id; - use into statements as a variable assignment
The select user_id_a into b from orer_frequncy where user_id_a=id;
The update orer_frequncy
The set orer_frequncy. Frequncy=1 where orer_frequncy. Id=I;
If a=b
Then the set f=f + 1;
The else set f=1;
end if;
set i=i+1;
end while;
End

CodePudding user response:

The code you write, SSMS are not given you wrong? Is completely blind to,
There are no mistakes in addition to the first line of the begin, everything else is wrong.

Write the correct grammar to ask again

CodePudding user response:

Forgot to say, this is a stored procedure, I written in monitoring cat MYSQL function function, version 10.7

It took me a few days temporary self-taught... Before learn SQL, not only learned some process oriented programming language, I don't know written in SQL process oriented, more do not know how to object-oriented, so how can you tell me where the grammar is wrong?

CodePudding user response:

In addition, SSMS did not report errors
  • Related