You can save the IF part at the end if you switch it to V_test := (v_counter < 10); The part inside the () is a true or false statement which will be false only when v_counter reaches or exceeds 10.
@kashifihsan7 жыл бұрын
YOU ARE RIGHT . I DID IT. v_counter := v_counter + 1; v_test := (v_counter < 10); DBMS_OUTPUT.PUT_LINE(v_counter);
@helpingustayfit3 жыл бұрын
With simple example you explain the concept very well. thank you Sir for awesome learning
@stephinstephen95985 жыл бұрын
Here is what you asked for, SET SERVEROUTPUT ON; DECLARE v_test BOOLEAN :=TRUE; v_counter NUMBER :=0; v_result NUMBER; BEGIN WHILE v_test LOOP v_counter := v_counter +1; v_result := v_counter * 19; DBMS_OUTPUT.PUT_LINE(v_counter||' x '|| 19 ||' = '||v_result); IF v_counter =10 THEN v_test := FALSE; END IF; END LOOP; DBMS_OUTPUT.PUT_LINE('Outside the Loop'); END;
@delvenacquire90053 жыл бұрын
Instead of that if condition for terminate loop can we use exit when commend like EXIT WHEN v_counter >= 10; (Boolean program)
@shrav84269 жыл бұрын
Hi Manish, Please find the program for multiplication table of 8 till 12. SET SERVEROUTPUT ON; DECLARE v_test BOOLEAN := TRUE; v_counter NUMBER :=0; v_result NUMBER; BEGIN WHILE v_test LOOP v_counter := v_counter + 1; v_result := 8 * v_counter; DBMS_OUTPUT.PUT_LINE('8' || '*' || v_counter || '=' || v_result ); IF v_counter = 12 THEN v_test := FALSE; END IF; END LOOP; DBMS_OUTPUT.PUT_LINE('DONE'); END;
@nithyalakshmim80874 жыл бұрын
set serveroutput on declare v_counter boolean:= true; v_num number:=0; v_res number; begin while v_counter loop v_num := v_num + 1; v_res := 19 * v_num; dbms_output.put_line(19||'X'||v_num||'='||v_res); if v_num>=10 then v_counter:=false; end if; end loop; end; / for multiplication table of 19 using a boolean expression
@Rebellionrider4 жыл бұрын
well done 👍
@nithyalakshmim80874 жыл бұрын
@@Rebellionrider 😊
@chanda_cartoon_handle Жыл бұрын
Dear teacher, I have a problem with Boolean datatype v_test variable. I get message like this "v_test" must be declared. But I have declared it already. Could you help me?
@clearcoding31397 жыл бұрын
Answer of the home work: SET SERVEROUTPUT ON; DECLARE V_NUMBER NUMBER := '&ENTER_NUMBER'; V_TEST BOOLEAN := TRUE; V_COUNTER NUMBER := 0; V_RESULT NUMBER; BEGIN WHILE V_TEST LOOP V_COUNTER := V_COUNTER + 1; V_RESULT := V_NUMBER * V_COUNTER; DBMS_OUTPUT.PUT_LINE(V_NUMBER||' X '||V_COUNTER||' = '||V_RESULT); IF V_COUNTER = 10 THEN V_TEST := FALSE; END IF; END LOOP; END; /
@ubaidchougule3 жыл бұрын
SET SERVEROUTPUT ON; DECLARE u_multiply BOOLEAN :=TRUE; u_counter NUMBER :=0; u_result NUMBER; BEGIN WHILE u_multiply LOOP u_counter:= u_counter +1; u_result :=16 * u_counter; DBMS_OUTPUT.PUT_LINE ('16'|| ' x '|| u_counter||' = '||u_result); IF u_counter >=10 THEN u_multiply :=FALSE; END IF; END LOOP; DBMS_OUTPUT.PUT_LINE ('LOOP ENDED.THANKS MANISH'); END; /
@sudhanshubaranwal62155 жыл бұрын
Hi Manish, I tried 'dbms_output.put_line' just before starting of while loop but i am getting an error. Can you help me with that why i am getting an error
@manishshaw23935 жыл бұрын
Can anyone please tell me what is this IDE abd how to download it......nice explanation btw...thanks for making such videos✌️
@Rebellionrider5 жыл бұрын
Thank you so much. I am really glad that you enjoyed my videos. Your appreciation means a lot to me. Regarding IDE, I am using a free tool offered by Oracle itself, it’s called SQL Developer. Check out this video here I have explained how to download and configure it. Step 1: Download and setup SQL Developer kzbin.info/www/bejne/sJ3Md2uhjbugm6c Step 2: How To Connect Your Database With SQL Developer Oracle 11g - www.rebellionrider.com/how-to-make-new-database-connection-in-sql-developer-rebellionrider/ Oracle 12c - kzbin.info/www/bejne/qn2pm6qvfah4p80 Oracle 18c - kzbin.info/www/bejne/Z5jZf2R3a92hrrc Thanks and have a great day!
@maulikchaudhari91634 жыл бұрын
SIR, I HAVE CONPLETED SQL. SIR IS IT COMPLETE SYLLEBUS FOR PLSQL FOR FRESHERS INTERVIEW ...?? PLZ SUGGEST ME SIR
@Rebellionrider4 жыл бұрын
Yep this is the entire syllabus. Can't say anything about fresher interview but people from around the world messaged and commented that they got job after learning Oracle from this channel. Some even said that their interviewer asked the same question that I have listed down in my blogs. So, don't worry, learn from this channel and my blog (www.rebellionrider.com) and practice. All the best for your future 😊
@kumarkrori4 жыл бұрын
Hi Manish, I am executing a package.sp from shell script. How do I use SERVEROUTPUT ON for DBMS_OUTPUT.PUT_LINE?..please help
@SM-qd5vw8 жыл бұрын
sir please make video on static and dynamic sql
@monkeyd.luffyd67757 жыл бұрын
set serveroutput on declare a boolean:=true; b number:=0; c number :=0; begin while a loop b:=b+1; c:=19*b; dbms_output.put_line('19 '||' x '||b||' = if b =10 then a:=false; end if; end loop; dbms_output.put_line('outside loop'); end; /
@afiqrubiyan69548 жыл бұрын
hi manish my question is what is the use of boolean expression as a test condition in while loop
@srajanjain25414 жыл бұрын
I appreciate your efforts ... but please don't put banner of LIKE THIS VIDEO or SUSCRIBE in middle of your teaching its disturbs a lot and distracts focus and attention as you having very good PL/SQL series. You put them in end only like you do. We always like,share & subscribe your video as its fruitful...thanks...Wishing you will try to improve this problem in your future videos.
@DamaraskaArya5 жыл бұрын
Is it can be debugged by without creating functions, proc or package?
@Vykycy7 жыл бұрын
set SERVEROUTPUT ON declare v_test boolean :=true; v_counter number :=0; v_result number; v_constant constant number := 19; begin while v_test loop v_result:= v_constant * v_counter; v_counter:= v_counter +1; dbms_output.put_line(v_constant || 'x' || v_counter || '='|| v_result); if v_counter =100 then v_test :=false; end if; end loop; dbms_output.put_line('Outside the loop'); end;
@NormalIssues4 жыл бұрын
DECLARE v_counter NUMBER:=0; v_result NUMBER:=0; v_test BOOLEAN:= TRUE; BEGIN WHILE v_test LOOP v_counter := v_counter +1; v_result := 10*v_counter; DBMS_OUTPUT.PUT_LINE('10'||'x'||v_counter||'='||v_result); IF v_counter=10 THEN v_test:= FALSE; END IF; END LOOP; END; THANKS
@antonalmishev17842 жыл бұрын
set SERVEROUTPUT ON; DECLARE v_counterA number :=1; v_counterB number :=1; v_result number ; v_stop boolean:=true; BEGIN while v_stop LOOP v_result := v_counterB*v_counterB; DBMS_OUTPUT.PUT_LINE(v_counterA || ' x ' || v_counterB || ' = ' || v_result); v_counterA := v_counterA +1; v_counterB:=v_counterB+1; IF v_counterA = 10 then v_stop := false; END IF; END LOOP; DBMS_OUTPUT.PUT_LINE('OUTSITE FROM THE LOOP'); END;
@nadunsamarasinghe5592 Жыл бұрын
set serveroutput on; declare vcounter number :=1; vresult number; vtest boolean :=TRUE; begin while vcounter
@vaibhavpatel18928 жыл бұрын
why r u initialize v_counter as a 1 insted of 0 becoj in simple loop u have used 0 insted of 1 totally confused
@supriyosinha78007 жыл бұрын
set SERVEROUTPUT ON; cl scr; DECLARE a NUMBER:=&Enter_the_number; b NUMBER:=0; c NUMBER; d boolean:=True; BEGIN while d loop b:=b+1; c:=a*b; DBMS_OUTPUT.PUT_LINE(a||'X'||b||'='||c); if b=10 then d:=false; end if; end loop; end;
@kapilchaudhary6886 жыл бұрын
how to increse text size in sql developer ?
@Kapil18916 жыл бұрын
How to come out from infinity loop?
@gummadinagalakshmi40835 жыл бұрын
By using exit or exit when clause you can come out from infinity loop