Oracle PL SQL interview question Explain Cursor Attributes

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 พ.ย. 2024

ความคิดเห็น • 55

  • @djeidam
    @djeidam 2 ปีที่แล้ว +2

    I am eating all your youtube content about oracle pl/sql as a hungry wolf. Keep this awsome work up, thank you!

  • @kunuturuaravindareddy5580
    @kunuturuaravindareddy5580 2 ปีที่แล้ว +2

    just one point we can use %found and %not found with implicit cursors i have referred many resources and there are examples as well.thank you.

  • @nagarajut5934
    @nagarajut5934 2 ปีที่แล้ว

    Thank you so much sir for creating your valuable PL/SQL videos

  • @svanaja331
    @svanaja331 2 ปีที่แล้ว +1

    No words to say, great effort

  • @aruljoannes6490
    @aruljoannes6490 3 ปีที่แล้ว

    Your videos are very useful
    I have learnt a lot from you
    Thank you!
    we can use %found and %notfound with implicit cursors
    DECLARE
    FNAME EMP.FIRST_NAME%TYPE;
    ROWCOUNT NUMBER;
    BEGIN
    SELECT FIRST_NAME INTO FNAME FROM EMP WHERE EMPLOYEE_ID = 108;
    ROWCOUNT := SQL%ROWCOUNT;
    IF SQL%FOUND THEN
    DBMS_OUTPUT.PUT_LINE(ROWCOUNT||' ROW AFFECTED ');
    ELSIF SQL%NOTFOUND THEN
    DBMS_OUTPUT.PUT_LINE('NO ROWS GET AFFECTED');
    END IF;
    END;
    /

  • @narpika
    @narpika 2 ปีที่แล้ว

    Great video series!
    16:30 Interestingly enough - SQL%isopen returns FALSE even if we are actually looping through the implicit cursor in a FOR loop - where we would presume that it is open. I did not expect that!
    DECLARE
    emp_row emp%ROWTYPE;
    row_count number;
    BEGIN
    for emp_row in (select ename from emp) loop
    dbms_output.put_line('Name : '||emp_row.ename||' (cursor is OPEN='||(case when SQL%isopen then 'TRUE' else 'FALSE' end)||') ');
    row_count:=SQL%rowcount;
    end loop;
    dbms_output.put_line(row_count||' row(s) found');
    dbms_output.put_line(' (cursor is OPEN='||(case when SQL%isopen then 'TRUE' else 'FALSE' end)||') ');
    END;

  • @TruptiDesai-v7e
    @TruptiDesai-v7e ปีที่แล้ว

    Thank you for all your video's. One correction for this vedio, we can use found and notfound attribute with implicit cursor

  • @jayshreemandule2336
    @jayshreemandule2336 ปีที่แล้ว

    Write a program in PL/SQL to show the uses of SQL%FOUND to determine if a DELETE statement affected any rows

  • @manjutharak
    @manjutharak 2 ปีที่แล้ว +1

    Nice explanation and can you please make a video on how to Debugging concept please ?

  • @mr.b6101
    @mr.b6101 2 ปีที่แล้ว

    Great. Content

  • @sujaa1000
    @sujaa1000 4 ปีที่แล้ว

    Thanks again Siva, the tutorial was very details, please make videos on performance tuning, that would be greatly helpful.
    Sujaa

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว +1

      Welcome, Sure, due to time constraint, i am not able to post all requests, however, all these are part of my upcoming list, please stay tuned.

  • @write2subho83
    @write2subho83 5 ปีที่แล้ว +2

    We can have FOUND and NOTFOUND attributes with implicit cursors.
    SQL%FOUND has one of these values:
    If no SELECT or DML statement has run, NULL.
    If the most recent SELECT or DML statement returned a row, TRUE.
    If the most recent SELECT or DML statement did not return a row, FALSE.
    SQL%NOTFOUND has one of these values:
    If no SELECT or DML statement has run, NULL.
    If the most recent SELECT or DML statement returned a row, FALSE.
    If the most recent SELECT or DML statement did not return a row, TRUE.

  • @renevillalta27
    @renevillalta27 4 ปีที่แล้ว

    Great Videos

    • @SivaAcademy
      @SivaAcademy  4 ปีที่แล้ว

      It's my pleasure,Thank you

  • @rahulbadhe5930
    @rahulbadhe5930 5 ปีที่แล้ว

    hii sir plz make a session on ''oracle hints' and performance tunning... its very needed .
    thanks for this good session..

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Rahul, Sure, will be starting performance related videos soon, Please stay tuned

  • @mkr7345
    @mkr7345 4 ปีที่แล้ว

    Good explanation .....👏👍

  • @krishnarajesh1980
    @krishnarajesh1980 4 ปีที่แล้ว

    A procedure have passing an input parameters those parameters will pass the 2nd,3rd,4th and 5th cursors for the same parameters how to pass that parameters into n cursors and it is stored into the table
    Eg:
    Proc a(p_id number)
    as
    Cursor c is select name,no from emp where id={p_id};
    Cursor d is select dname,dno,femail from dept where id={p_id};
    cursor e is select cname,cstreet,cdo from city c,dept d where c.id=d.id and c.id={p_id};
    begin
    For I in c;
    Insert a record into emp table;
    End loop;
    For i1 in d;
    Insert the same {Id} into dept table;
    End loop;
    For i2 in e;
    Same as above
    End loop;
    End;

  • @shumailasami2277
    @shumailasami2277 5 ปีที่แล้ว

    Normal cursor can be passed as parameter between procedure?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว +1

      @Shumaila, Normal cursor cannot be passed, however you can use the refcursor, will cover this in next set of videos

  • @sridhartamilselvan
    @sridhartamilselvan 5 ปีที่แล้ว

    Good job sir...

  • @mukeshchitte3870
    @mukeshchitte3870 5 ปีที่แล้ว

    Why '%NOTFOUND' is separate cursor attribute in Oracle, if '%FOUND' true/false can manage?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      Just two different methods for same functionality, if will check and update you if there is any specific use case.

  • @swamivivekananda-cyclonicm8781
    @swamivivekananda-cyclonicm8781 2 ปีที่แล้ว

    Happy Teachers Day :)

    • @SivaAcademy
      @SivaAcademy  2 ปีที่แล้ว

      🙏🙏🙏Thank you

  • @vaibhavkantsrivastava2220
    @vaibhavkantsrivastava2220 2 ปีที่แล้ว

    Dear Sir,
    Thanks for all your valuable videos.
    Please help us understand following..
    1) What would happen if a cursor finds NULL values in a table/column, Will it exit from there or it would keep on moving till the whole rows of that table gets eventually checked, let say there are millions of rows.
    2) Please help us guide installing Oracle and configuring it in our system for our learning purpose. I did all the steps and installed plugged in database, however I am not able to create any tables as I do not have privilege for this.
    3) Can we see the status of records being currently merged into a table i.e. current progress of merge going on OR how many records are still there to be updated if millions of records are there. This would decide us to either wait it for or cancel that session and try new one.

  • @surendragorle7908
    @surendragorle7908 2 ปีที่แล้ว

    Sir where the cursor memory created

  • @krishnarajesh1980
    @krishnarajesh1980 4 ปีที่แล้ว

    Open c_cur;
    Loop
    Fetch c_cur into c_cur_extn;
    For i in c_cur_extn.first..c_cur_extn.last loop
    DBMS_OUTPUT.PUT_LINE('DETAILS :'||c_cur.fname||','||c_cur.lname);
    End loop;
    Exit when c_cur%notfound;
    End loop;
    Close c_cur;
    If my cursor data comes 0 records it throws an exception may i know the reason

  • @bharathipandian45
    @bharathipandian45 5 ปีที่แล้ว

    I created a column with index, I am using the same column in the like clause. Will incident be considered?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว +1

      @Bharathi, it depends on how we use like, for example '%A%' may not use index, however 'A%' likely to use index. I will try to post an video with examples soon

  • @dattakor1548
    @dattakor1548 5 ปีที่แล้ว

    10 on 10✌✌✌

  • @bharathipandian45
    @bharathipandian45 5 ปีที่แล้ว +1

    I have asked many questions, pls forgive me. Please reach to me if you need any help in framing the content or anything related to it

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว +1

      @Bharathi, No problem at all, always welcome, If i can able to answer, I will be more happy, however due to time constraint I am not able to reply as soon as possible, whenever I see the massages, i always try to reply.... i would suggest, you consolidate all the questions, and send to my mail, so that I can address whenever I am recording the related topics.

  • @bharathipandian45
    @bharathipandian45 5 ปีที่แล้ว

    About merge statment

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @baharathi, Merge statement is basically to do insert or update as part of single statement, whenever the record is present, this will update, if not present it will to insert. will explain with example later.

  • @shumailasami2277
    @shumailasami2277 5 ปีที่แล้ว

    Latest version of oracle?

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Shumaila, As of Apr-19, Oracle 19C is the latest database version released by oracle

    • @shumailasami2277
      @shumailasami2277 5 ปีที่แล้ว

      @@SivaAcademy as interview point of view how can answer this ques... What's new in 19c than previous version?

    • @shumailasami2277
      @shumailasami2277 5 ปีที่แล้ว

      One more ques index can be drop and updated?second what difference between cluster db object and cluster & non- cluster index

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Shumaila, Every new version of oracle introduces few new features, and upgrades to existing features, you can always to oracle documentation of version specific page.
      In this channel, whatsoever the new feature, i have explored, I have posed as separate "new feature video series" for oracle 12C, 18C and 19C. You can find the links here. But this is not the end of the list, I would recommend to refer to documentation, because, what I am posting here is only developer specific features.
      th-cam.com/play/PLb1qVSx1k1VrrqOl24XR9BtCFMNwcRbhr.html
      th-cam.com/play/PLb1qVSx1k1Vqe06V1tIBcvnslMPWX69bW.html
      th-cam.com/play/PLb1qVSx1k1VqM1u2IHWzZIgziqejl6wx-.html
      Thanks,
      Siva

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @Shumaila, Yes you can drop and recreate an index at any time you want. regarding cluster and non-cluster index, i will post as a seperate video. Please stay tuned.

  • @santhoshkumar-yn7su
    @santhoshkumar-yn7su 3 ปีที่แล้ว

    this video is completely blurred

  • @bharathipandian45
    @bharathipandian45 5 ปีที่แล้ว

    Oracle scdelor

    • @SivaAcademy
      @SivaAcademy  5 ปีที่แล้ว

      @bharathi, to schedule the PLSQL jobs inside database, we can use scheduler, THis is very similar to cron jobs in unix, however this is for database.