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
Questions
What is the use of function feof ( ) in C language?
- Open a file
- Find file pointer
- Find address of file
- Find end of file
- Find begining of file
Which of the following characters are used for comment line and repeat command respectively in oracle?
- -- and /
- -- and &
- -- and &&
- -- and //
- // and --
Which of the following is not an oracle datatype?
- Char
- Varchar
- Number
- Integer
- Date
Find the output of the following SQL.
Select mod(10, 3) from dual;
- 1
- 10
- 3
- 30
- 0
Which of the following are pattern matching operators in oracle language?
- % and _
- % and &
- _ and &
- & and *
- none of these
Which of the following is incorrect about table level constraint in oracle?
- Given after all column definition.
- Composite constraints can be given.
- Not NULL cannot be given.
- Columns can be compared with each other.
- None of these
Which of the following is incorrect about self join in oracle?
- Table joins to itself.
- Used to handle self referential integrity.
- The table is logically divided and table alias are used.
- Table appears twice in the from clause following their alias.
- None of these
Forced views are generally used to create images of which of the following?
- Single table
- Multiple table
- Non-existing tables
- Triggers
- None of these
Which of the following is the correct PL/SQL function to print on screen?
- dbms_output.put_line ('Text');
- dbms-output.put-line ('Text');
- dbms_output ('Text');
- printf (Text);
- puts(Text);
What is the output of the following?
substr (hiredate, - 2, 2)
Given that hiredate is 01 Feb 13.
- 1
- 01
- 13
- 31
- None of these
% rowtype dynamic data type is used in oracle PL/SQL to access
- single variable
- entire row of a table
- entire column of a table
- entire table
- multiple row
Which of the following is incorrect about views in oracle?
- It is a stored query.
- Replica or image of a table.
- Changes either in table or in view will reflect in both.
- It provides restricted access to table.
- It occupies same storage space as table does.
Which SQL statement will give different output as compared to others in oracle database?
- Select * from emp where not Job = 'Manager';
- Select * from emp where Job != 'Manager;
- Select * from emp where Job <> 'Manager';
- Select * from emp where Job not in ('Manager');
- Select * from emp where Job in ('Manager');
Which of he following is the correct SQL statement to select ENAME, SAL and a virtual column 10% INCREASED SAL from emp table?
- Select ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;
- Select ENAME, SAL, SAL* 10 10% INCREASED SAL from emp;
- Select ENAME, SAL, SAL* 0.01 '10% INCREASED SAL' from emp;
- Find ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;
- Seek ENAME, SAL, SAL* 0.1 10% INCREASED SAL from emp;
Which of the following SQL commands is not allowed in PL/SQL?
- Insert
- Update
- Delete
- Select
- Create
Which of the following statements is incorrect while inserting data into oracle table?
- Characters enclosed within single quotes
- Date datatypes enclosed within single quotes
- NULL values are written as NULL.
- Number data not to be enclosed in single quotes
- If some columns are fed with values, then rest will be assigned zero
Which of the following is not a large object datatype in oracle?
- BLOB
- CLOB
- NCLOB
- BFILE
- None of these
Which of the following is not the cursor attribute in oracle?
- % is open
- % found
- % not found
- % row count
- % cursor
All variables must be defined in the________ section of the PL/SQL.
- declaration
- executable
- exception handler
- declaration and executable
- none of these
Which of the following is not the format specifier in C language?
- %h
- %o
- %x
- %d
- %z