Tumgik
#I see the timestamps and the first messages will start 15-20 mins before the last loooooool
foryouthegays · 3 years
Text
techno liveblog w timestamps lets go for ‘a new home (dream SMP)’ stream
good laugh times: 00:13:50, 00:14:55, 1:38:45, ik it doesnt look like a lot but like u should watch the stream anyway bc philzas there and his laugh is amazing and they just go so well together
times techno calls phil his friend: 00:6:00 00:37:00, 00:45:17, 0:1:09:30, 01:11:15, 01:26:35, 01:50:05, 2:35:00
FSDJKFAF;LS HE KEPT THE MUTED INTRO IN JHKADFLS (ends at 00:1:25)
i like how, when faced with Leaving Youtube, techno would choose to be an author. i want a book by techno. reblog this if u want a book by techno (with an audiobook by him as well) /hj. 00:1:33
i love how he says ehhhhhh so much lskjhdfas (abt 2 mins in) 
who the FUCK just remembers that the word fortuitous exists wtf 00:5:17
00:7:45 PHILZA TIME PHILZA TIME LETS GO
00:8:55 tommy time :/
0:14:10 rANBOO JUST WALKS IN, LOOKS AROUN ,AND LEA VE SIM CRYING 
i love how much philza laughs at technos jokes bc pretty much everything he says IS a joke he just says it in such a serious voice that p much everyone else is like,,,yeah,,,,yup,,,,and phil just knows when hes joking and his laugh is so good with technos voice. sbi? whos that? i only know philza and technoblade
00:19:30 ghostbur joins! this is my first time hearin ghostbur btw
00:19:40 haha string axe technos so bad at crafting what a fool /j
00:21:07 ghostbur: “Even I remember how to make a fishing rod!” ghostbur u just MURDERED technoblade oh my god im gonna scream hgjdfksla i love ghostbur so much
00:23:55: GHOSTBUR NO!! DON’T DIE YOU’LL BECOME A DOUBLE GHOST!!!! -technoblade 2020
00:24:55 technoblade neva lies -guys he almost did the technoblade neva dies ahh!!!!!
i havent heard anyone talk about this but techno has a dedicated roleplay voice. like listen to him talk to tommy at 00:25:08. his voice gets more even, he uses names a lot more often (seriously, listen to his theseus speech. he says tommy so often, its incredible.), and his voice gets,,,,deeper? not deeper but smoother, in a way, and he repeats what he says for emphasis instead of humor. and his voice is louder, and he seems more assertive. 
00:27:30 philza: where we goin, by the way? techno: to our- to my new home. 
techno cmon let phil live w u wed get so much more content cmonn
00:28:50 the fact that he calls the manhunt theme “dream music” makes me laugh so hard. and then his version of it,,,,,m love he (also he sings it here and at  01:14:20)
00:35:10 why is ranboo so cryptic im-
why does he just casually know the word sentry wh at i hate him 00:39:45
this is the worst sentence (structurally) ive ever heard techno say im gonna cry 00:49:33 ‘im too busy thinkin of new ideas to sleep so i could actually execute them’ and tubbos *oh?* after is just hdsfgkjlka
Tumblr media
LKSJDHFJK 00:51:49
00:54:30
techno: thats one of dreams powers, he can just stop the rain
tubbo, quietly: like jesus!
i love them sm dsfhkjla they kept going but i jus gdfhjksa jesus has op
techno @ being the second worst thing to ever happen to those orphans: haha funnie!!
techno @ having fun w religious stuff: i wILL BE CANCELLED NO-
00:58:10 “hey if ur [ghostbur]  a ghost, do instant damage potions heal you now?” “...no,, they hurt me still :(” DSIULZKJHFSLKFJH 
01:04:00 his brother named the cow bob im- aww 
also he has a fanart wall again!!!
01:09:30 “phil, you’re the only friend i have left in this world.” aWWWWW HE GAVE HIM THE COMPASS 
“dont smoke, it’s a joke” -technoblade 01:14:15
ROLEPLAY SPEECH VOICE IS BACK AT 1:16:10 “they pillage my base for everything i’m worth, they use me for the revolution, but oooOOOoo i took a pickaxe with his consent? oOOOooOo i’m a thief!”
holy shit 01:17:15 “you know what, phil? for you, the world, alright? it’s fine.” oH MY GOD HHHHGHG (context, right before they were arguing bc phil took some blocks from his base and techno thought that when he said phil could take anything he meant from the chests)
the COMIDY of that villager coming in and sleeping while techno was readin donos at 01:22:05 RIGHT AFTER phil freaked out abt inturruptin his dono readin im SFDHKJLA:
techno talkin bout the winstreak and how he wont be able to live up to that sort of playin at 01:22:30ish is super important and ill transcribe it tomorrow, but if u can id highly rec watchin it. 
01:24:20 “[readin dono] what’s your favorite movie? uh, the princess bride is pretty good” techno ily that movie rocks also he said it so fast like hes ashamed of it noo
techno says no to canon ranboo son btw! 01:25:30
01:25:55 “i wasnt in that story, therefore it doesnt matter” all of technoblr be like 
01:37:49 is great lemmie transcribe
“how have you still not gotten a second monitor?? holy shit.”
“let me tell you something. and im only telling you this because i know that so many people in the chat are gonna be furious. so i recently realized- i think the second monitor can just be any ol’ monitor, right? you literally just plug it in, and its set up? well i mean you have to turn on some settings, but like, thats it, or something?”
“yeah,,,,, uh techno you fuckin destroyed my chat, by the way, oh my god, [earlier techno told his viewers to twitch prime philza] there has been like 40 primes just flying through”
“yeahhh twitch prime!!! twitch prime philza yeahh!!! so anyways the other day, i like, i looked to my left, and realized that my old monitor has been like, five feet away from where i sit and stream for the last three years?”
“oh my god...”
“so i- i literally do not have to leave my room to set up a second monitor and i havent. and i’m still usin my laptop for this stream.
“is this gonna be one of those situations where you like, you have a thing, you just refuse to do the thing?”
“listen, my desk is-
“yOU STILL HAVENT OPENED UP THE HYPIXEL PACKAGE!!!”
“AHHHH I HAVENT OPENED UP THE HYPIXEL PACKAGE! I HAVENT EVEN OPENED UP MY MCC COIN! DUDE I HAVENT EVEN OPENED UP MY ONE MILLION SUBSCRIBER PLAQUE! ITS STILL THERE RIGHT BEHIND ME! ITs sTILL IN THE BOX! i never made a video on it....”
“bruhhhhh [philza laughs] thats FREE VIEWS what are you doing??”
“ill open it at 8 mil :/.”
“you could LITERALLY make a video of you just like, throwing it off a wall, and then thumbing up, like doing a thumbs up, and then that would be it. 10 seconds. ten seconds. thumb and elbow in shot. [laughs]”
techno is such a disaster i love him
01:34:18 the way techno says “tommy, that statement has NEVER been true” i dont like sayin i simp for block men but GOD sometimes his voice is nicer than usual hhhgn
“man i sure wish tommyinnit was in this stream” -nobody ever (just after previous timestamp)
01:40:15 is fuckin hilarious and im actually crying oh my god techno just says things and says them well with a completely straight face how does he do it
i cannot WAIT until theres a president w the last/first name andy so we can say president andy and think abt technoblade
IM CRIASDNGUSFHD 01:44:38 PHILZA LOOK OUT LOOK OUT PHILZA  LSKJDAFJASD;LKF
i love when techno talks abt his vids. like u can tell he puts a lot of thought into the vids (esp these ones) and like at 01:47:00 he talks abt the “I DIDNT PUT DEAPTH STRIDER ON THOSE BOOTS, FUNDY!” and how its just that creepin realization that you were doomed from the start and how he made the armor, he isnt intimidated by the netherite bc he didnt enchant it all the way and only he knows that,,, and i just,,,hgg he
he reveals that hes writin the next arc at 01:48:00: “oh, speakin of arcs, chat, i’m writing the next arc. so, you know. hope nothin bad happens in two weeks, chat!” IM SO EXCITED like he clearly has his character fleshed out and is SO good at writing and retellin history im so so excited to see where he takes it AHHHH and also taht means he might stream more bc he might make his character more important (keep in mind this is the guy who wrote self insert hypixel fanfics. he has no shame in puttin himself first and i respect him so much for it) 
01:51:20 “they’re tryin to get a second customer but they’re riskin their first” is lowkey a good line
has anyone else noticed that techno says wise a lot? like at 01:55:10 he literally says “wise dragon armor” as a joke but like i think he says wise so much BECAUSE of skyblock like hjkfdsla
01:57:30 techno plea se eat 
ok 1:58:45 is hilarious and all but at the end of his ramble he says “come back, i miss you” and lowkey im crying 
techno needs to stop knowing his audience more than we know ourselves im hsfkjda 02:05:25 “the chat’s spammin ‘eat technoblade, eat!’ like they’re not gonna start, like, theyre not gonna get super sad if i ended the stream right now, like theyre not gonna all cry ‘i miss technoblade *sniffs* why- whyd he leave to eat food, why did he listen to our advice noooo’”
02:14:50 NEW VIDEO POGGGG CARL THE HORSE POGGGGGG  NOT A STREAM HIGHLIGHT POGGGGG
02:17:40 “i could start a potato farm out here to show how much ive changed” techno last time u made a potato farm u started an entire war that lasted a year that does NOT say calm and retired to me lskgdfjagsldj
02:23:00 why does techno just reference greek mythology so much. makin me scared for his arc. 
also he talks abt smp earth a lot in this stream i love it so much
i also just. love?? how much sbi respect tommy like they bully him but when talkin bout him they just have so much respect for how much work he puts into youtube and i just,,,,hgnn they r friends 
02:33:13 sbi streamer house lets go cmon
02:34:15 “i think if i streamed every day i could keep up” on one hand YE S  but on the ohter oh god techno no we have to keep up tho
hearing techno say “violence isnt the answer” is so scary  02:35:40
02:37:30 technosneeze 
hiS BROTHER SENT HIM 46 DISCORD MESSAGES SFKDJLFLKASF 2:49:25 i love his end screen so much hes just sadness,,,,retirement,,,t,echnoblade,,,the government is going to fall on its own due to lack of organization and ideals,,,,,,subscribe,,,,,sadness,,,,,also 2:50:45 is making me laugh so hard its just sad music and technos like??? whys phil in my house drinking milk????? 
overall, fantastic stream, if ya want some chill techno philza content i highly recommend. 
44 notes · View notes
siva3155 · 4 years
Text
300+ TOP PL/SQL Interview Questions and Answers
PL/SQL Interview Questions for freshers experienced :-
1. What is PL/SQL? It is defined as SQL having Procedural features of Programming Language i.e. Procedural Language extension of SQL. 2. Explain the structure of PL/SQL in brief. PL/SQL is a procedural language which has interactive SQL, as well as procedural programming language constructs like conditional branching and iteration. 3. Explain uses of cursor. Cursor is a named private area in SQL from which information can be accessed. They are required to process each row individually for queries which return multiple rows. 4. Show code of a cursor for loop. Cursor declares %ROWTYPE as loop index implicitly. It then opens a cursor, gets rows of values from the active set in fields of the record and shuts when all records are processed. Eg. FOR smp_rec IN C1 LOOP totalsal=totalsal+smp_recsal; ENDLOOP; 5. Explain the uses of database trigger. A PL/SQL program unit associated with a particular database table is called a database trigger. It is used for : Audit data modifications. Log events transparently. Enforce complex business rules. Maintain replica tables Derive column values Implement Complex security authorizations 6. What are the two types of exceptions. Error handling part of PL/SQL block is called Exception. They have two types : user_defined and predefined. 7. Show some predefined exceptions. DUP_VAL_ON_INDEX ZERO_DIVIDE NO_DATA_FOUND TOO_MANY_ROWS CURSOR_ALREADY_OPEN INVALID_NUMBER INVALID_CURSOR PROGRAM_ERROR TIMEOUT _ON_RESOURCE STORAGE_ERROR LOGON_DENIED VALUE_ERROR etc. 8. Explain Raise_application_error. It is a procedure of package DBMS_STANDARD that allows issuing of user_defined error messages from database trigger or stored sub-program. 9.Show how functions and procedures are called in a PL/SQL block. Function is called as a part of an expression. total:=calculate_sal(‘b644’) Procedure as a statement in PL/SQL. calculate_bonus(‘b644’); 10. Explain two virtual tables available at the time of database trigger execution. Table columns are referred as THEN.column_name and NOW.column_name. For INSERT related triggers, NOW.column_name values are available only. For DELETE related triggers, THEN.column_name values are available only. For UPDATE related triggers, both Table columns are available.
Tumblr media
PL/SQL Interview Questions 11. What are the rules to be applied to NULLs whilst doing comparisons? NULL is never TRUE or FALSE NULL cannot be equal or unequal to other values If a value in an expression is NULL, then the expression itself evaluates to NULL except for concatenation operator (||) 12. How is a process of PL/SQL compiled? Compilation process includes syntax check, bind and p-code generation processes. Syntax checking checks the PL/SQL codes for compilation errors. When all errors are corrected, a storage address is assigned to the variables that hold data. It is called Binding. P-code is a list of instructions for the PL/SQL engine. P-code is stored in the database for named blocks and is used the next time it is executed. 13. Differentiate between Syntax and runtime errors. A syntax error can be easily detected by a PL/SQL compiler. For eg, incorrect spelling. A runtime error is handled with the help of exception-handling section in an PL/SQL block. For eg, SELECT INTO statement, which does not return any rows. 14. Explain Commit, Rollback and Savepoint. For a COMMIT statement, the following is true: Other users can see the data changes made by the transaction. The locks acquired by the transaction are released. The work done by the transaction becomes permanent. A ROLLBACK statement gets issued when the transaction ends, and the following is true. The work done in a transition is undone as if it was never issued. All locks acquired by transaction are released. It undoes all the work done by the user in a transaction. With SAVEPOINT, only part of transaction can be undone. 15. Define Implicit and Explicit Cursors. A cursor is implicit by default. The user cannot control or process the information in this cursor. If a query returns multiple rows of data, the program defines an explicit cursor. This allows the application to process each row sequentially as the cursor returns it. 16. Explain mutating table error. It occurs when a trigger tries to update a row that it is currently using. It is fixed by using views or temporary tables, so database selects one and updates the other. 17. When is a declare statement required? DECLARE statement is used by PL/SQL anonymous blocks such as with stand alone, non-stored procedures. If it is used, it must come first in a stand alone file. 18. How many triggers can be applied to a table? A maximum of 12 triggers can be applied to one table. 19. What is the importance of SQLCODE and SQLERRM? SQLCODE returns the value of the number of error for the last encountered error whereas SQLERRM returns the message for the last error. 20. If a cursor is open, how can we find in a PL/SQL Block? the %ISOPEN cursor status variable can be used. 21. Show the two PL/SQL cursor exceptions. Cursor_Already_Open Invaid_cursor 22. What operators deal with NULL? NVL converts NULL to another specified value. var:=NVL(var2,’Hi’); IS NULL and IS NOT NULL can be used to check specifically to see whether the value of a variable is NULL or not. 23. Does SQL*Plus also have a PL/SQL Engine? No, SQL*Plus does not have a PL/SQL Engine embedded in it. Thus, all PL/SQL code is sent directly to database engine. It is much more efficient as each statement is not individually stripped off. 24. What packages are available to PL/SQL developers? DBMS_ series of packages, such as, DBMS_PIPE, DBMS_DDL, DBMS_LOCK, DBMS_ALERT, DBMS_OUTPUT, DBMS_JOB, DBMS_UTILITY, DBMS_SQL, DBMS_TRANSACTION, UTL_FILE. 25. Explain 3 basic parts of a trigger. A triggering statement or event. A restriction An action 26. What are character functions? INITCAP, UPPER, SUBSTR, LOWER and LENGTH are all character functions. Group functions give results based on groups of rows, as opposed to individual rows. They are MAX, MIN, AVG, COUNT and SUM. 27. Explain TTITLE and BTITLE. TTITLE and BTITLE commands that control report headers and footers. 28. Show the cursor attributes of PL/SQL. %ISOPEN : Checks if the cursor is open or not %ROWCOUNT : The number of rows that are updated, deleted or fetched. %FOUND : Checks if the cursor has fetched any row. It is true if rows are fetched %NOT FOUND : Checks if the cursor has fetched any row. It is True if rows are not fetched. 29. What is an Intersect? Intersect is the product of two tables and it lists only matching rows. 30. What are sequences? Sequences are used to generate sequence numbers without an overhead of locking. Its drawback is that the sequence number is lost if the transaction is rolled back. 31. How would you reference column values BEFORE and AFTER you have inserted and deleted triggers? Using the keyword “new.column name”, the triggers can reference column values by new collection. By using the keyword “old.column name”, they can reference column vaues by old collection. 32. What are the uses of SYSDATE and USER keywords? SYSDATE refers to the current server system date. It is a pseudo column. USER is also a pseudo column but refers to current user logged onto the session. They are used to monitor changes happening in the table. 33. How does ROWID help in running a query faster? ROWID is the logical address of a row, it is not a physical column. It composes of data block number, file number and row number in the data block. Thus, I/O time gets minimized retrieving the row, and results in a faster query. 34. What are database links used for? Database links are created in order to form communication between various databases, or different environments like test, development and production. The database links are read-only to access other information as well. 35. What does fetching a cursor do? Fetching a cursor reads Result Set row by row. 36. What does closing a cursor do? Closing a cursor clears the private SQL area as well as de-allocates memory 37. Explain the uses of Control File. It is a binary file. It records the structure of the database. It includes locations of several log files, names and timestamps. They can be stored in different locations to help in retrieval of information if one file gets corrupted. 38. Explain Consistency Consistency shows that data will not be reflected to other users until the data is commit, so that consistency is maintained. 39. Difference between Anonymous blocks and sub-programs. Anonymous blocks are unnamed blocks that are not stored anywhere whilst sub-programs are compiled and stored in database. They are compiled at runtime. 40. Differ between DECODE and CASE. DECODE and CASE statements are very similar, but CASE is extended version of DECODE. DECODE does not allow Decision making statements in its place. select decode(totalsal=12000,’high’,10000,’medium’) as decode_tesr from smp where smpno in (10,12,14,16); This statement returns an error. CASE is directly used in PL/SQL, but DECODE is used in PL/SQL through SQL only. 41. Explain autonomous transaction. An autonomous transaction is an independent transaction of the main or parent transaction. It is not nested if it is started by another transaction. There are several situations to use autonomous transactions like event logging and auditing. 42. Differentiate between SGA and PGA. SGA stands for System Global Area whereas PGA stands for Program or Process Global Area. PGA is only allocated 10% RAM size, but SGA is given 40% RAM size. 43. What is the location of Pre_defined_functions. They are stored in the standard package called “Functions, Procedures and Packages” 44. Explain polymorphism in PL/SQL. Polymorphism is a feature of OOP. It is the ability to create a variable, an object or function with multiple forms. PL/SQL supports Polymorphism in the form of program unit overloading inside a member function or package..Unambiguous logic must be avoided whilst overloading is being done. 45. What are the uses of MERGE? MERGE is used to combine multiple DML statements into one. Syntax : merge into tablename using(query) on(join condition) when not matched then command when matched then command 46. Can 2 queries be executed simultaneously in a Distributed Database System? Yes, they can be executed simultaneously. One query is always independent of the second query in a distributed database system based on the 2 phase commit. 47. Explain Raise_application_error. It is a procedure of the package DBMS_STANDARD that allow issuing a user_defined error messages from the database trigger or stored sub-program. 48. What is out parameter used for eventhough return statement can also be used in pl/sql? Out parameters allows more than one value in the calling program. Out parameter is not recommended in functions. Procedures can be used instead of functions if multiple values are required. Thus, these procedures are used to execute Out parameters. 49. How would you convert date into Julian date format? We can use the J format string : SQL > select to_char(to_date(‘29-Mar-2013’,’dd-mon-yyyy’),’J’) as julian from dual; JULIAN 50. Explain SPOOL Spool command can print the output of sql statements in a file. spool/tmp/sql_outtxt select smp_name, smp_id from smp where dept=’accounts’; spool off; 51. What are the system privileges that are required by a schema owner (user) to create a trigger on a table? A user must be able to alter a table to create a trigger on the table. The user must own the table and either have the ALTER TABLE privilege on that table or have the ALTER ANY TABLE system privilege. In addition, the user must have the CREATE TRIGGER system privilege. User should have the CREATE ANY TRIGGER system privilege to be able to create triggers in any other user account or schema. A database-level event trigger can be created if the user has the ADMINISTER DATABASE TRIGGER system privilege. 52. What are the different types of triggers? There are following two types of triggers: Database triggers are executed implicitly whenever a Data Manipulation Language (DML) statement is carried out on a database table or a Data Definition Language (DDL) statement, such as CREATE OR ALTER, is performed on the database. They may also be executed when a user or database event occurs, such as a user logs on or a database is shutdown. Application triggers are executed implicitly whenever a DML event takes place within an application, such as WHEN_NEW_FORM_INSTANCE in the Oracle Forms application. 53. How can triggers be used for the table auditing? Triggers can be used to track values for data operations on tables. This is done using the old and new qualifiers within the trigger code. These two clauses help keep track of the data that is being inserted, updated, or deleted in the table; and therefore, facilitate in application auditing of DML statements. The audit trail can be written to a user-defined table and audit records can be generated for both row-level and statement-level triggers. 54. What are INSTEAD OF triggers? The INSTEAD OF triggers are used in association with views. The standard table-based triggers cannot be used by views. These triggers inform the database of what actions are to be performed instead of the actions that invoked the trigger. Therefore, the INSTEAD OF triggers can be used to update the underlying tables, which are part of the views. They can be used on both relational views and object views. The INSTEAD OF triggers can only be defined as row-level triggers and not as statement-level triggers. 55. What is the difference between database trigger and stored procedure? The main difference between database trigger and stored procedure is that the trigger is invoked implicitly and stored procedure is invoked explicitly. Transaction Control statements, such as COMMIT, ROLLBACK, and SAVEPOINT, are not allowed within the body of a trigger whereas, these statements can be included in a stored procedure. 56. How can the performance of a trigger be improved? The performance of a trigger can be improved by using column names along with the UPDATE clause in the trigger. This will make the trigger fire when that particular column is updated and therefore, prevents unnecessary action of trigger when other columns are being updated. 57. What are the events on which a database trigger can be based? Database triggers are based on system events and can be defined at database or schema level. The various events on which a database trigger can be based are given as follows: Data definition statement on a database or schema object Logging off or on of a specific user Database shutdown or startup On any specific error that occurs 58. What is a CALL statement? Explain with an example. A CALL statement within a trigger enables you to call a stored procedure within the trigger rather than writing the Procedural Language/Structured Query Language (PL/SQL) code in it, The procedure may be in PL/SQL, C, or Java language. Following is an example of the CALL statement: CREAT OR REPLASE TRIGGER BEFORE UPDATE OF ON FOR EACH ROW WHEN CALL 59. What is a mutating table? A mutating table is a table, which is in the state of transition. In other words, it is a table, which is being updated at the time of triggering action. If the trigger code queries this table, then a mutating table error occurs, which causes the trigger to view the inconsistent data. 60. Which data dictionary views have the information on the triggers that are available in the database? The data dictionary views that have information on database triggers are given as follows: USER_OBJECTS —Contain the name and status of a trigger as well as the date and time of trigger creation USER_ERRORS—Contain the compilation error of a trigger USER_ TRIGGERS— Contain the source code of a trigger USER_ TRIGGER_COLS—Contain the information on columns used in triggers 62. What are schema-level triggers? Schema-level triggers are created on schema-level operations, such as create table, alter table, drop table, rename, truncate, and revoke. These triggers prevent DDL statements, provide security, and monitor the DDL operations. 63. What is a database event trigger? Trigger that is executed when a database event, such as startup, shutdown, or error, occurs is called a database event trigger. It can be used to reference the attributes of the event and perform system maintenance functions immediately after the database startup. 64. In what condition is it good to disable a trigger? It is good to disable triggers during data load operations. This improves the performance of the data loading activities. The data modification and manipulation that the trigger would have performed has to be done manually after the data loading. 65. Which column of the USERJTRIGGERS data dictionary view displays the database event that will fire the trigger? The Description column of the USERJTRIGGERS view combines information from many columns to display the trigger header, which includes the database event. 66. What is the meaning of disabling a trigger? When a trigger is disabled, it does not mean that it is deleted. The code of the trigger is still stored in the data dictionary but the trigger will not have any effect on the table. 67. Can triggers stop a DML statement from executing on a table? Yes, triggers have the capability of stopping any DML statement from execution on a table. Any logical business rule can be implemented using PL/SQL to block modification on table data. 68. Can a view be mutating? If yes, then how? No, a view cannot be mutating like a table. If an UPDATE statement fires an INSTEAD OF trigger on a view, the view is not considered to be mutating. If the UPDATE statement had been executed on a table, the table would have been considered as mutating. 69. Can a COMMIT statement be executed as part of a trigger? No, A COMMIT statement cannot be executed as a part of a trigger because it is a Transaction Control statement, which cannot be executed within a trigger body. Triggers fire within transactions and cannot include any Transaction Control statement within its code. 70. What is the difference between ALTER TRIGGER and DROP TRIGGER statements? An ALTER TRIGGER statement is used to recompile, disable, or enable a trigger; whereas, the DROP TRIGGER statement is used to remove the trigger from the database. 71. Do triggers have restrictions on the usage of large datatypes, such as LONG and LONG RAW? Triggers have restrictions on the usage of large datatypes as they cannot declare or reference the LONG and LONG RAW datatypes and cannot use them even if they form part of the object with which the trigger is associated. Similarly, triggers cannot modify the CLOB and BLOB objects as well however, they can reference them for read-only access. 72. Are DDL triggers fired for DDL statements within a PL/SQL code executed using the DBMS.SQL package? No, DDL triggers are not executed for DDL statements, which are executed within the PL/SQL code using the DBMS_SQL package. 73. Does a USER_OBJECTS view have an entry for a trigger? Yes, the USER_OBJECTS view has one row entry for each trigger in the schema. 74. How can you view the errors encountered in a trigger? The USERJERRORS view can be used to show all the parsing errors that occur in a trigger during the compilation until they are resolved. 75. Does USERJTRIGGERS have entry for triggers with compilation errors? Yes, USER_TRIGGERS have entries for all triggers that are created in the schema with or without errors. 76. Is it possible to pass parameters to triggers? No, it is not possible to pass parameters to triggers. However, triggers fired by INSERT and UPDATE statements can reference new data by using the mew prefix. In addition, the triggers fired in response to UPDATE and DELETE statements can reference old, modified, or deleted data using the :old prefix. 77. Can a SELECT statement fire a trigger? No, a SELECT statement cannot fire a trigger. DML statements, such as INSERT, UPDATE, and DELETE, can cause triggers to fire. 78. Can cursors be part of a trigger body? Yes, cursors can be a part of code in trigger. 79. Is it possible to create STARTUP or SHUTDOWN trigger for ON-SCHEMA? No, It is not possible to create STARTUP or SHUTDOWN triggers for ON-SCHEMA. 80. What does the BASE_OBJECT_TYPE column shows in the USER.TRIGGERS data dictionary view? The BASE_OBJECT_TYPE column identifies the type of database object with which the trigger is associated. It shows whether the object of database is a TABLE, VIEW, SCHEMA, or DATABASE. 81. Is it possible to create the following trigger: BEFORE OR AFTER UPDATE trigger FOR EACH ROW? No, it is an invalid trigger as both BEFORE and AFTER cannot be used in the same trigger. A trigger can be either BEFORE TRIGGER or AFTER TRIGGER. 82. Can INSTEAD OF triggers be used to fire once for each statement on a view? No, INSTEAD OF triggers cannot be used for each statement however, It can only be used for each row on a view. 83. Is it possible to include an INSERT statement on the same table to which the trigger is assigned? If an INSERT statement is used on the same table to which the trigger is associated, then this will give rise to a mutating table, as it is not possible to change the same table that is already in the process of being changed. 84. What are conditional predicates? Triggers use conditional predicates, such as INSERTING, UPDATING, and DELETING, to determine which particular event will cause the trigger to fire. All the three predicates have Boolean values and are useful in triggers, such as AFTER INSERT or UPDATE. 85. Write the ALTER statement to enable all the triggers on the T.STUDENTS table. The ALTER statement is given as follows: ALTER TABLE T_STUDENTS ENABLE ALL TRIGGERS; 86. Which column in the USER.TRIGGERS data dictionary view shows that the trigger is a PL/SQL trigger? The ACTION_TYPE column of the USER_TRIGGERS data dictionary view shows that the trigger is a PL/SQL trigger. 87. Differentiate between % ROWTYPE and TYPE RECORD. % ROWTYPE is used when a query returns an entire row of a table or view. TYPE RECORD, on the other hand, is used when a query returns column of different tables or views. Eg. TYPE r_emp is RECORD (sno smp.smpno%type,sname smp sname %type) e_rec smp ROWTYPE Cursor c1 is select smpno,dept from smp; e_rec c1 %ROWTYPE PL/SQL Questions and Answers Pdf Download Read the full article
0 notes