I have an SQL file which uses declares a cursor and I am running it using @abc, but it did not execute all statements and waiting without returning to command prompt. It did not proceed after declare cursor statement. When I tried to run the declare cursor statement in command mode, the same problem is happening again. I am able to return to SQL priompt only after pressing Ctrl + C. I am very new to SQL world. Though this could be a basic mistake, I am not able to find out the solution in any site. Any help is greatly appreciated.
SQL> DECLARE CURSOR id_cursor IS SELECT id FROM user_names WHERE dept_no = 1002
AND BITAND(flags, 4) = 4 AND time_created BETWEEN 1137974400 AND 1326067199;
2
3
4 ;
5
6
DECLAREwithoutBEGIN ... ENDis a nonsense