0

Oracle and Java Programming

Attempted 0/20 Correct 0 Score 0

What is the use of function feof ( ) in C language?

  1. Open a file

  2. Find file pointer

  3. Find address of file

  4. Find end of file

  5. Find begining of file


Correct Option: D
Explanation:

This function seeks the end of file.

Which of the following characters are used for comment line and repeat command respectively in oracle?

  1. -- and /

  2. -- and &

  3. -- and &&

  4. -- and //

  5. // and --


Correct Option: A
Explanation:

-- is used to make comment line and / is used to repeat previous command in sql plus prompt.

Which of the following is not an oracle datatype?

  1. Char

  2. Varchar

  3. Number

  4. Integer

  5. Date


Correct Option: D
Explanation:

Integer is not an oracle datatype.

Find the output of the following SQL. Select mod(10, 3) from dual;

  1. 1

  2. 10

  3. 3

  4. 30

  5. 0


Correct Option: A
Explanation:

10/3 = 3 and reminder is 1, which is mod.

Which of the following are pattern matching operators in oracle language?

  1. % and _

  2. % and &

  3. _ and &

  4. & and *

  5. none of these


Correct Option: A
Explanation:

These are pattern matching operators used in oracle used with LIKE.

Which of the following is incorrect about table level constraint in oracle?

  1. Given after all column definition.

  2. Composite constraints can be given.

  3. Not NULL cannot be given.

  4. Columns can be compared with each other.

  5. None of these


Correct Option: E
Explanation:

Since all other options are correct for Table level constraints, therefore, this is the correct option.

Which of the following is incorrect about self join in oracle?

  1. Table joins to itself.

  2. Used to handle self referential integrity.

  3. The table is logically divided and table alias are used.

  4. Table appears twice in the from clause following their alias.

  5. None of these


Correct Option: E
Explanation:

Correct option

Forced views are generally used to create images of which of the following?

  1. Single table

  2. Multiple table

  3. Non-existing tables

  4. Triggers

  5. None of these


Correct Option: C
Explanation:

Forced view is used for the table, which are not created. This concept is required for bigger programs, where many people are working on the same project.

Which of the following is the correct PL/SQL function to print on screen?

  1. dbms_output.put_line ('Text');

  2. dbms-output.put-line ('Text');

  3. dbms_output ('Text');

  4. printf (Text);

  5. puts(Text);


Correct Option: A
Explanation:

This is the correct syntax of the function used to print on screen.

What is the output of the following? substr (hiredate, - 2, 2) Given that hiredate is 01 Feb 13.

  1. 1

  2. 01

  3. 13

  4. 31

  5. None of these


Correct Option: C
Explanation:

substr function extracts part of the date data type as per the parameters given in it. -2 indicates that the counting will starts from Right side and 2 character will be selected. Hence 13.

% rowtype dynamic data type is used in oracle PL/SQL to access

  1. single variable

  2. entire row of a table

  3. entire column of a table

  4. entire table

  5. multiple row


Correct Option: B
Explanation:

%rowtype is used to select entire row of a table. It does not consider the datatype of the individuals cells.

Which of the following is incorrect about views in oracle?

  1. It is a stored query.

  2. Replica or image of a table.

  3. Changes either in table or in view will reflect in both.

  4. It provides restricted access to table.

  5. It occupies same storage space as table does.


Correct Option: E
Explanation:

It s a stored query and creates virtual columns from table in memory.

Which SQL statement will give different output as compared to others in oracle database?

  1. Select * from emp where not Job = 'Manager';

  2. Select * from emp where Job != 'Manager;

  3. Select * from emp where Job <> 'Manager';

  4. Select * from emp where Job not in ('Manager');

  5. Select * from emp where Job in ('Manager');


Correct Option: E
Explanation:

This will give all data of emp table only where Job is Manager.

Which of he following is the correct SQL statement to select ENAME, SAL and a virtual column 10% INCREASED SAL from emp table?

  1. Select ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;

  2. Select ENAME, SAL, SAL* 10 10% INCREASED SAL from emp;

  3. Select ENAME, SAL, SAL* 0.01 '10% INCREASED SAL' from emp;

  4. Find ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;

  5. Seek ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;


Correct Option: A
Explanation:

This is the correct SQL statement to find the specified fields with the virtual column.

Which of the following SQL commands is not allowed in PL/SQL?

  1. Insert

  2. Update

  3. Delete

  4. Select

  5. Create


Correct Option: E
Explanation:

Incorrect option

Which of the following statements is incorrect while inserting data into oracle table?

  1. Characters enclosed within single quotes

  2. Date datatypes enclosed within single quotes

  3. NULL values are written as NULL.

  4. Number data not to be enclosed in single quotes

  5. If some columns are fed with values, then rest will be assigned zero


Correct Option: E
Explanation:

Rest will be assigned with NULL.

Which of the following is not a large object datatype in oracle?

  1. BLOB

  2. CLOB

  3. NCLOB

  4. BFILE

  5. None of these


Correct Option: E
Explanation:

Correct option

Which of the following is not the cursor attribute in oracle?

  1. % is open

  2. % found

  3. % not found

  4. % row count

  5. % cursor


Correct Option: E
Explanation:

It is not a cursor attribute.

All variables must be defined in the________ section of the PL/SQL.

  1. declaration

  2. executable

  3. exception handler

  4. declaration and executable

  5. none of these


Correct Option: A
Explanation:

In PL/SQL, all variables must be declared in declaration section.

Which of the following is not the format specifier in C language?

  1. %h

  2. %o

  3. %x

  4. %d

  5. %z


Correct Option: E
Explanation:

No such format specifier is used in C language.

- Hide questions