Week4 - Usage of Single-Row Functions to Customize Output / Explore | E-BOX DBMS

Week4 - Usage of Single-Row Functions to Customize Output / Explore | E-BOX DBMS

Week4 - Usage of Single-Row Functions to Customize Output / Explore

The questions can come in any order, so make sure you are selecting right option for all questions.

What is the output of the following Query? select replace ('skillgun','l',d') from dual

    (c) skiddgun

Which function is used for converting a string into lower case?

    (b) lower()

What is the default format for "Date" data type?

    (a) DD-MON-YY

Which of the following is illegal?

    (d) None of the mentioned

What will be the output of the following query?
select INSTR('Tech on the net', 'e', 1, 3) from dual;

    (c) 14

Result of the below query will be:
select length('Amphisoft') from dual;

    (c) 9

Result of the below query will be:
select SUBSTR('This is a test', 6) from dual;

    (a) is a test

SELECT FLOOR(49.11) FROM DUAL;

    (b) 59

*Result of the below query will be:
SELECT DATEADD(month, 1, '2006-08-31'); *

    (c) Error

**Result of the below query will be:

SELECT TO_DATE('10/07/2004 13:31:45', 'DD/MM/YYYY HH24:MI:SS') FROM dual;**

    (a) 10-JUL-04

**select dateadd(mm, -2, '07-Aug-2010') from dual;

If the above query is executed on 07-Aug-2010 then the result will be:**

    (b) Error

**Result of the below query will be:

select NEXT_DAY('06-Aug-03', 'SUNDAY') from dual;**

    (b) 10-Aug-03

**Will the query be executed

select ENAME from EMP where HIREDATE between '02-APR-81' and '08-SEP-81'; **

    (a) Yes

select to_date('26-JAN-09')-to_date('01-JAN-08', 'dd-mon-yy')from dual;

    (d) 391

SELECT CEIL(48.99) FROM DUAL;

    (d) 49

Which of the following functions calculates the number of months between two dates?

    (b) MONTHS_BETWEEN

Result of the below query will be:
SELECT MONTHS_BETWEEN ('02-Dec-2018', '02-Dec-2018') AS RESULT FROM dual;

    (b) 0

What is the maximum number of input arguments in LPAD and RPAD functions?

    (c) 3

What is the output of the following query. Select Lower('COURSE') as lower from dual;

    (b)
    LOWER
    course

he SQL statement SELECT SUBSTR('abcdefghij', INSTR('123321234', '2', 3, 2), 2) FROM DUAL; prints

    (a) gh