Oracle interview question : Can we use DML and DDL statements inside function?

Oracle interview question : Can we use DML and DDL statements inside function?

Siva Academy

5 лет назад

77,001 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

@ManojKumar-il8vt
@ManojKumar-il8vt - 17.08.2018 04:52

Nice explanation sir..

Ответить
@monicabn3067
@monicabn3067 - 23.10.2023 18:03

Shiva truly your contents are spot on ❤😊

Ответить
@pradnyabapat9531
@pradnyabapat9531 - 19.08.2023 17:32

Can we use commit in trigger body?

Ответить
@SUJATAMANNA
@SUJATAMANNA - 20.07.2023 03:44

Hi...can we use commit inside a stored procedure?

I undeestand in function we can do that.

Ответить
@rekhad2756
@rekhad2756 - 09.06.2023 14:52

Can you add videos for how create and drop TABLE in side a package please...

Ответить
@hariharan-ze2zq
@hariharan-ze2zq - 01.03.2023 11:24

How to find exact error line while using functions...is there any options...

Ответить
@manjutharak
@manjutharak - 22.02.2023 08:27

Q) Can we use Procedure inside the function ? -- I gave the answer YES because in 19c we can use
Q) Can we use a Function inside the Procedure? -- I gave the answer YES

These are interview questions asked in google company please help us to get an answer

Ответить
@ganeshshirke8564
@ganeshshirke8564 - 12.11.2022 18:30

Sir can you provide me sql and plsql notes

Ответить
@SatyendraSingh-ul5iq
@SatyendraSingh-ul5iq - 12.10.2022 19:02

can we use DML inside a function if we do not call function with select statement.

Ответить
@swamivivekananda-cyclonicm8781
@swamivivekananda-cyclonicm8781 - 17.07.2022 12:43

Fanstatic. Concept becomes clear with perfect example. Thank you.

Ответить
@gurumoorthysivakolunthu9878
@gurumoorthysivakolunthu9878 - 07.07.2022 09:03

Thank you, Sir....
...
If we are calling the function seperately not in select statement -- do we still need to mention pragma_autonomous_transaction....?
Thank you, Sir....

Ответить
@somyashreem5109
@somyashreem5109 - 29.06.2022 19:40

Please put video of complete SQL course...I am just liking your way of teaching..

Ответить
@learntolive5001
@learntolive5001 - 27.06.2022 07:59

Nice Video!!! Is there any video on "Dynamic SQL"???

Ответить
@rajasekarm3009
@rajasekarm3009 - 12.06.2022 15:31

how to create table and insert values by using DYNAMIC SQL
in stored procedure

Ответить
@simhadrisuresh8630
@simhadrisuresh8630 - 05.12.2021 04:05

I have one doubt sir can I modified the views sir

Ответить
@peramsudheerreddy9888
@peramsudheerreddy9888 - 09.10.2021 19:04

Tq u so much bro.this question exactly asking in interview.tq so much

Ответить
@SANDEEPSUBH
@SANDEEPSUBH - 04.09.2021 20:19

You take class of Postgresql DBA ?

Ответить
@Ananda_vmp
@Ananda_vmp - 04.06.2021 17:57

I have been asked the same question by the interviewer. I wish I would have seen your video before heading to the interview .

Ответить
@ramkumarj4216
@ramkumarj4216 - 14.05.2021 10:23

Is there a way to verify the DDL & DML statement execution getting successful inside the PRAGMA autonomous_transaction function.

Ответить
@chsurekha4126
@chsurekha4126 - 12.03.2021 07:33

If we dont use the function in select statement, then will it allow us to do dmls and ddls without autonomous transaction aa sir.?

Ответить
@RAMPRASAD-sv7is
@RAMPRASAD-sv7is - 24.02.2021 21:23

Can we call a procedure inside a function and vice versa . Please explain

Ответить
@vishalsaxena5081
@vishalsaxena5081 - 22.02.2021 18:59

declare
n0 number(38):=&n0;
n1 number(38):=&na;
n2 number(38):=&n2;
res number(38'2);
begin
case n0
when 1 then
res:=n1+n2;
dbms_output.put_line('Sum ='||res);
end case;
exception
when no_data_found then
dbms_output.put_line('Number not valid')
end;
/

agr m invalid value enter krra hu to error handle hokr program success ho jaega but m chahta hu k after exception block program again ask me value n number of value means koi bhi value

in short m exception block k bad phr se code run krna chahta hu jo begin section m h

Ответить
@azharsha3476
@azharsha3476 - 18.12.2020 12:09

Really awesome ❤️👍

Ответить
@pkrt085
@pkrt085 - 27.10.2020 13:56

sir,I have just gone through your vedio..it really helpful for the beginners as well as for experienced professionals. thanks for this great work.

Ответить
@akshaybhong2898
@akshaybhong2898 - 21.10.2020 22:57

Once in interview interviewer asked me one question. ..


If u have 100000 lines of code and there is runtime error occurred. ..supposed junk value is inserted into a some tables..

How can u resolved it...

Ответить
@akshaybhong2898
@akshaybhong2898 - 21.10.2020 22:55

Like all your videos sir...and your actually explaining with real time scenario so it will help very well to understand and explain in interviews..

Ответить
@naveenmogasala7327
@naveenmogasala7327 - 17.10.2020 10:06

Siva bhayya,please upload your pic or come live once,we want to see you and love you for your wonderful and valuable videos, keeping going.

Ответить
@pankajkharade6936
@pankajkharade6936 - 14.10.2020 17:42

nice 👌🏼👌🏼

Ответить
@rajeshnaidu9331
@rajeshnaidu9331 - 18.04.2020 17:34

Hi siva,
You are the amazing person , sharing knowledge not expecting anything .
Your all wishes come true in quick way.

Can you please make video on pragma autonomous transaction .

Ответить
@sateeshbabu5792
@sateeshbabu5792 - 20.03.2020 14:10

Thanks sir

Ответить
@mustaqali8849
@mustaqali8849 - 10.03.2020 20:08

Can you explain bulk collect

Ответить
@WorldEye88
@WorldEye88 - 27.02.2020 18:34

This is very helpful. I would suggest never executing DDL ststms in a function but if it must be done, now it is clear how to. Thank you.

Ответить
@pranaykamble4840
@pranaykamble4840 - 31.12.2019 06:42

Excellent explanation in your all videos 🕺🕺👌

Ответить
@ankithag9152
@ankithag9152 - 15.12.2019 22:02

Hi sir, can you explain the difference between PL/SQL and Java with SQL?

Ответить
@narendrascollections7445
@narendrascollections7445 - 28.09.2019 19:15

Can we write autonomous function in SQL server

Ответить
@narendrascollections7445
@narendrascollections7445 - 28.09.2019 19:15

Can we write autonomous function in SQL server

Ответить
@sandeeps373
@sandeeps373 - 20.09.2019 09:13

Thanks Sir,The video is worth of watching,neatly explained and the contents in your channel seems unique. Keep uploading videos ..

Ответить
@harishharish-ug7vz
@harishharish-ug7vz - 11.09.2019 17:43

Sir please make a video on partitions and differences between cluster and indexes

Ответить
@nitinmishra5027
@nitinmishra5027 - 06.09.2019 03:07

Very Nice explanation!!

Ответить
@himanshunikhade1593
@himanshunikhade1593 - 18.08.2019 08:01

Wow what an explanation 👌🏼

Ответить
@bharathipandian45
@bharathipandian45 - 19.07.2019 13:06

Hi siva, why procedure cannot be called from sql statement...

Ответить
@govindugovindu617
@govindugovindu617 - 04.07.2019 17:21

FUNCTION COMPILED SUCCESSFULLY BUT IN EXECUTING IN SELECT STATEMENT IT IS ASKING INSUFFICIENT PRIVILEGES
CAN YOU GIVE ME THE SOLUTION FOR THIS

Ответить
@shaheenshaikh6701
@shaheenshaikh6701 - 18.06.2019 15:08

Sir im getting insufficient privileges error on executing execute immediate in function last one plz tell why its so

Ответить
@ashtyson7831
@ashtyson7831 - 12.05.2019 16:12

If am using ddl in function dynamically using execute immediate and pragma autonomous transaction through select statement..it is showing INSUFFICIENT PRIVILEGES

Ответить
@subhrapriyadarshini70
@subhrapriyadarshini70 - 23.04.2019 11:41

I was never be clear with plsql until i have watched these videos. Thanks for the clear explanation

Ответить
@ranjithavellaisamy15
@ranjithavellaisamy15 - 28.02.2019 14:39

Hi,


Well explained! Just can you please confirm below one,


What if we call functions having DML/DDL (using dynamic sql) statements through anonymous pl/sql block instead of using SELECT? I guess Pragma_Autonomous_transaction is not required.


Is that correct ?

Ответить
@premgona5587
@premgona5587 - 17.08.2018 10:01

Good question... But as per my knowledge I feel like it is a dummy question... No one use Function to do the DML and DDL... Function generally used for computing the results means returning the calculations of some operation...
DDL statements can be applied directly by using the plsql anonymous block if we don't want to run sql statements.

For this question, my answer also is YES.. We can use DML and DDL inside a function by using the select statement as well as pl/sql anonymous block.

I have tried both the ways and it worked.

Ответить