7 行目で構文エラーが発生します - "BEGIN" for while -
BEGIN
IF EXISTS(SELECT 1 from table1)
THEN
IF EXISTS(SELECT 1 from table2)
THEN
WHILE EXISTS(SELECT 1 FROM table3)
BEGIN
BEGIN TRANSACTION;
COMMIT TRANSACTION;
END
END IF;
END IF;
END
提案や指針はありますか?