Oracle Database and PL/SQL with C Programming Basics

Covers Oracle database concepts including SQL, PL/SQL, datatypes, constraints, views, joins, and cursor operations, plus C language fundamentals

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

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
Question 2 Multiple Choice (Single Answer)

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 --
Question 3 Multiple Choice (Single Answer)

Which of the following is not an oracle datatype?

  1. Char
  2. Varchar
  3. Number
  4. Integer
  5. Date
Question 4 Multiple Choice (Single Answer)

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

  1. 1
  2. 10
  3. 3
  4. 30
  5. 0
Question 5 Multiple Choice (Single Answer)

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

  1. % and _
  2. % and &
  3. _ and &
  4. & and *
  5. none of these
Question 6 Multiple Choice (Single Answer)

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
Question 7 Multiple Choice (Single Answer)

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
Question 8 Multiple Choice (Single Answer)

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
Question 9 Multiple Choice (Single Answer)

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);
Question 10 Multiple Choice (Single Answer)

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
Question 11 Multiple Choice (Single Answer)

% 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
Question 12 Multiple Choice (Single Answer)

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.
Question 13 Multiple Choice (Single Answer)

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');
Question 14 Multiple Choice (Single Answer)

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;
Question 15 Multiple Choice (Single Answer)

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

  1. Insert
  2. Update
  3. Delete
  4. Select
  5. Create
Question 16 Multiple Choice (Single Answer)

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
Question 17 Multiple Choice (Single Answer)

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

  1. BLOB
  2. CLOB
  3. NCLOB
  4. BFILE
  5. None of these
Question 18 Multiple Choice (Single Answer)

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

  1. % is open
  2. % found
  3. % not found
  4. % row count
  5. % cursor
Question 19 Multiple Choice (Single Answer)

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
Question 20 Multiple Choice (Single Answer)

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

  1. %h
  2. %o
  3. %x
  4. %d
  5. %z