MySql存储过程
时间:2021-07-01 10:21:17
帮助过:22人阅读
int(
4),
IN english_arg varchar(500),
IN hindi_arg varchar(500),
IN marathi_arg varchar(500),
IN tamil_arg varchar(500)
)
BEGIN
DECLARE count_sub_item INT(4);
select count(*) into count_sub_item
from subject_keywords
where sub_id =
sub_id_arg;
if count_sub_item >
0
THEN update subject_keywords set english = english_arg,hindi = hindi_arg,marathi = marathi_arg,tamil = tamil_arg
where sub_id =
sub_id_arg ;
ELSE insert into subject_keywords(sub_id,english,hindi,marathi,tamil) values(sub_id_arg,english_arg,hindi_arg,marathi_arg,tamil_arg);
end if;
select count_sub_item;
END;
call saveorupdate_sub_key_proc(412,
‘12‘,
‘aa‘,
‘cc‘,
‘dd‘);
MySql存储过程
标签:value create select char where save call arch _id