0
以下のコードでエラーが発生します。助けてくださいMySQLエラーコード:1064. SQL構文にエラーがあります。
エラーコード:1064. SQL構文にエラーがあります。ラインに近い「NULL」を使用する権利構文についてはMySQLサーバのバージョンに対応するマニュアルを確認してください1
- ルーチンDDL - 注意:ルーチン本体の前と後のコメントはしませんサーバー
DELIMITER $$
CREATE DEFINER=`C_sshankaranar`@`%` PROCEDURE `SIT1_NullCheck`(IN tName Varchar(50),IN attribute Varchar(50),Out NullCount int(11),Out PC Varchar(200),Out x int(11))
BEGIN
set @Sl=NULL;
set @S1 = Concat('select count(*) into @NullCount from SIT1_STG.',tName,' where ',attribute,' is NULL or ',attribute,'=''');
Prepare stmt from @Sl;
Execute stmt;
select SI into @x from dev2_stg2.Null_Check where Table_Name=tName;
If (@NullCount<>0) then
select Problem_Columns into @PC from dev2_stg2.Null_Check where [email protected];
Update dev2_stg2.Null_Check set Problem_Columns=Concat(@PC,' ',attribute) where [email protected];
End IF;
Update dev2_stg2.Null_Check
set Environment="SIT1_STG"
where [email protected];
Update dev2_stg2.Null_Check
set Update_Time=Now()
where [email protected];
END