Oracle-SQL/PLSQL MCQ with Answers SET - 3

 

Oracle-SQL/PLSQL MCQ with Answers SET - 3


 1. How Uniqueness of data is maintained in a Oracle





ANSWER= (A) By Using Primary Key or Unique Constraint
Explain:- The data uniqueness is maintained in Oracle by using Primary Key or Unique Constraint

 

2. Which constraint is used to to check data as per given condition at the time of data insertion





ANSWER= (C) Check
Explain:- In Oracle Check constraint is used to check the data at the time of data insertion based on a condition given

 

3. To maintain Non Nulability … data constraint is used





ANSWER= (A) Not Null
Explain:- Not Null data constraint is used to maintain Non Nulability in database

 

4. To represent string data which data types are used in Oracle





ANSWER= (A) Char, Varchar2
Explain:- In Oracle Char and Varchar2 data type is used to represent string data

 

5. The current date is displayed using … keyword





ANSWER= (C) Sysdate
Explain:- In Oracle Sysdate keyword is used to display current date on screen.

 

6. What is correct syntax to delete all rows in a table





ANSWER= (A) Delete From Tablename;
Explain:- In Oracle to delete all rows or records from table Delete From Tablename; query is used

 

7. How to delete a specific row from table





ANSWER= (B) Delete From Tablename Where Condition;
Explain:- In Oracle to delete particular row from table Delete From Tablename Where Condition; query is used

 

8. To retrieve all rows from table what is the correct query from below





ANSWER= (A) Select * from Tablename;
Explain:- In Oracle retrieve all the rows Select * from Tablename; query is used

 

9. Select correct query for given question: Retrieve all the employee whose salary is greater than 50000





ANSWER= (A) Select * from Employee Where Salary >50000;
Explain:- To retireve information or rows from table with a condition is Select * from Employee Where Salary >50000;

 

10. To make the group on one or more columns …. Clause is used





ANSWER= (C) Group By
Explain:- The Group By Clause is used to make group on one or more columns in Oracle

 

11. Which query or clause is used to sort information from table in a particular order





ANSWER= (A) Order By
Explain:- In Oracle the Order By clause is used to sort the information from table in Ascending or Descending Order

 

12. In Oracle if you do not specify the order of sorting tha information using ORDER By Clause then by default data is sorted in …. Order





ANSWER= (C) Ascending
Explain:- In Oracle If the sording order is not mentioned in ORDER BY query then Query will return the data by default in Ascending Order

 

13. The … and … keywords are used to sort the data in particular order





ANSWER= (C) Asc, Desc
Explain:- In Oracle to sort the data in Ascending or Descending order, Order By clause is used. In Order By clause you can mention the sorting order by using keywords ASC or DESC

 

14. The … clause is used to give the condition in Group By Clause





ANSWER= (D) Having
Explain:- In Oracle to give condition in Group By clause the Having clause is used

 

15. The … clause is used to to select the tablename to retrieve the data





ANSWER= (B) From
Explain:- In Oracle to select the tablename from the database we use from clause.

टिप्पणी पोस्ट करा

0 टिप्पण्या