APACHE SOLR QUIZ DESCRIPTION Total Questions −30 00 Max Time − 15:00 You want all dates when any employee was hired. Multiple employees were hired on the same date and you want to see the date only once. Query – 1 Select distinct hiredate From hr.employee Order by hiredate; Query – 2 Select hiredate From hr.employees Group by hiredate Order by hiredate; Which of the above query is valid? Query – 1 Query – 2 Both None of the above The || is is an example of what function SELECT last_name || ‘, ‘ || first_name || ‘ ‘ || middle_name FROM employees; Incantination Integration Continuation Concatenation In the context of MS SQL SERVER, with the exception of ………… column(s), any column can participate in the GROUP BY clause. bit text ntext image What are the three parameter modes for procedures? IN, OUT, IN OUT R(ead), W(rite), A(ppend) CONSTANT, VARIABLE, DEFAULT COPY, NOCOPY, REF Below query is run in SQL Server 2012, is this query valid or invalid: Select count(*) as X from Table_Name Group by () Valid Invalid Select incorrect variable declarations foo_number varchar2(10); foo_text number(10); foo_char char(1) := ‘Y’; foo_text varchar2(10) := ‘hello world’; What is the maximum number of exception handlers processed before the PL/SQL block is exited, provided an exception occurs? Please select the best answer. None All exceptions that are referenced in the block One All exceptions that apply A nested subprogram can be called from the main procedure or from the calling environment. Trueor False? True False If left out, which of the following would cause an infinite loop to occur in a simple loop? LOOP END LOOP IF-THEN EXIT PL/SQL subprograms, unlike anonymous blocks, are compiled each time they are executed. True or False? True False The sequence of the columns in a GROUP BY clause has no effect in the ordering of the output. TRUE FALSE For the purposes of …………, null values are considered equal to other nulls and are grouped together into a single result row. Having Group By Both of above None of above What is the correct syntax to create procedure MYPROC that accepts two number parameters X and Y? CREATE PROCEDURE myproc (x NUMBER, y NUMBER) IS … CREATE PROCEDURE (x NUMBER, y NUMBER) myproc IS … CREATE PROCEDURE myproc IS (x NUMBER, y NUMBER) … CREATE PROCEDURE IS myproc (x NUMBER, y NUMBER) … Which of the following is not an Oracle DML function? DECODE TRUNCATE TO_CHAR NVL For which task is it best to use a character string enclosed by double quotes? Please select the best answer. Referring to a column in the database Using a reserved word to declare an identifier Using a hyphen to concatenate two columns Referring to a number variable by using a logical operator Subprograms and anonymous blocks can be called by other applications. True or False? True False Which of the following is not a feature of a cursor FOR loop? Record type declaration. Opening and parsing of SQL statements. Fetches records from cursor. Requires exit condition to be defined. Using GROUP BY ………… has the effect of removing duplicates from the data. with aggregates with order by without order by without aggregates Which of the following is not a valid Oracle PL/SQL exception. NO_DATA_FOUND ORA-01403 TWO_MANY_ROWS ORA-01422 DUP_VAL_ON_INDEX ORA-00001 OTHERS For which trigger timing can you reference the NEW and OLD qualifiers? Statement and Row Statement only Row only Oracle Forms trigger GROUP BY ALL generates all possible groups – even those that do not meet the query’s search criteria. TRUE FALSE What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs? Only one All that apply All referenced None What command can you use to see the errors from a recently created view or stored procedure? SHOW MISTAKES; DISPLAY MISTAKES; DISPLAY ERRORS; SHOW ERRORS; Which line in the following statement will produce an error? cursor action_cursor is select name, rate, action into action_record from action_table; Which one of the following statements about formal and actual parameters is true? Formal and actual parameters must have the same name. Formal and actual parameters must have different names. A formal parameter is declared within the called procedure, while an actual parameter is declared in thecalling environment. An actual parameter is declared within the called procedure. What is the value of customer_id within the nested block in the example below? /* Start main block */ DECLARE customer_id NUMBER(9) := 678; credit_limit NUMBER(10,2) := 10000; BEGIN /* Start nested block */ DECLARE customer_id VARCHAR2(9) := ‘AP56’; current_balance NUMBER(10,2) := 467.87; BEGIN — what is the value of customer_id at this point? NULL; END; END; 678 10000 ‘AP56’ 467.87 Where do you declare an explicit cursor in the PL/SQL language? In the PL/SQL working storage section In the PL/SQL declaration section In the PL/SQL body section In the PL/SQL exception section Select the invalid PL/SQL looping construct. A. WHILE LOOP … END LOOP; B. FOR rec IN some_cursor LOOP … END LOOP; C. LOOP … UNTIL ; END LOOP; D. LOOP … EXIT WHEN ; END LOOP; E. None of the above. All are valid. Answers are option A and C Answers are option A and B Answers are option A and D Answers are option C and D Which of the following statements is true about implicit cursors? Implicit cursors are used for SQL statements that are not named. Developers should use implicit cursors with great care. Implicit cursors are used in cursor for loops to handle data processing. Implicit cursors are no longer a feature in Oracle. List the correct sequence of commands to process a set of records when using explicit cursors INITIALIZE, GET, CLOSE CURSOR, GET, FETCH, CLOSE OPEN, FETCH, CLOSE CURSOR, FETCH, CLOSE Previous Next Total Question16 Wrong Answer13 Right Answer13