Saturday, June 24, 2017

Information Management Basics mcqs

1. When does FileOutputStream(File file)throw FileNotFoundException
Ans: If file does not exist but cannot be treated

2. With SQL, how can you return the number of records in the "Customer" table?
Ans: SELECT COUNT(*) FROM Customer

3.  Which command is used to delete the entire table data permanently?
Ans: truncate table

4. NULL will never match any value, unless the join condition uses IS NULL
Ans: True

5. Select one or more correct usage of subquery
Ans: Select * from department where departmentid not in(select departmentid from employee)

6. Select one or more right options to add column city to employee table
Ans: ALTER TABLE employee ADD CITY VARCHAR2(50)

7. Select TCL commands
Ans: savepoint

8. Select right option for deleting all rows from employee table permanently
Ans: TRUNCATE table employee

9. The effect of the ROLLBACK command in a transaction is to undo all changes to the database resulting from the execution of the transaction
Ans: true

10. Select one or more correct options to get number of employees where city information is present
Ans: SELECT count(*) FROM employee WHERE city IS NOT null

11. Which clause of select statement is used for ordering the columns data of a table in either(ascending or descending order)
Ans: Order by

12. In SQL Grant, revoke are
Ans: DCL

13. Which of the following sort the rows in SQL
Ans: Order by

14. CREATE SEQUENCE customer_seq START WITH 90; Created a sequence named customers_seq? What will be the output for the below statement SELECT customers_seq.currval FROM dual;
Ans: 91.0

15. The last value used in the sequence is 100, and if you want to reset the sequence and serve next value as 225. Select the appropriate statement for this
Ans: ALTER SEQUENCE customers_seq INCREMENT BY 125;

16. Syntax for Left Outer join is:
Ans: SELECT * FORM TableA LEFT JOIN TableB ON TableA.commonid=TableB.commonid

17. Normalization takes care of______
Ans: All the options (Redundancy, Atomicity, Isolation)

18. Create table emp(id number, name varchar2(10), dept varchar2(10));
How to retrieve unique dept for the above table
Ans: select distinct dept from emp;

19. Which one of the following is not a join?
Ans: LEFT INNER

20. Select the statement that is true
Ans: HTML is not case-sensitive where as XML is case-sensitive

21. Which of the following is incorrect?
Ans: All of these are correct (a) SELECT SYSDATE - SYSDATE FROM DUAL; b) SELECT SYSDATE + 2 FROM DUAL; c) SELECT SYSDATE - 2 FROM DUAL;)

22. Considering CNN is a table which stores the population of countries. Which of these statements shows the number of countries with population smaller than 150000
Ans: SELECT COUNT(name) FROM cnn WHERE population<150000

23. What is true about having clause?
Ans: It is used for putting a condition on the grouped data

24. In the_____normal form, a composite attribute is converted to individual attributes
Ans: First

25. The OR operator displays a record if ANY conditions listed are true. The AND operator displays a record if ALL of the conditions listed are true.
Ans: True

26. The effect of the ROLLBACK command in a transaction is the following:
Ans: Undo all changes to the database resulting from the execution of the transaction

27. Which clause of select statement is used for ordering the columns data of a table in either (ascending or descending order)
Ans: Order by

28. Which operator is used for pattern matching?
Ans: LIKE operator

29. Select right option for deleting all rows from employee table permanently
Ans: TRUNCATE table employee

30. In SQL, commit, rollback, savepoint are called as_____of SQL
Ans: TCL

31. Self join is not possible as it becomes cyclic
Ans: False

32. Third normal form addresses______dependency
Ans: Transitive

33. Select the right option for adding primary key constraint to employee table
Ans: ALTER TABLE customer ADD CONSTRAINT pk_customer PRIMARY KEY(emplo)*

34. Primary Key constraint is a combination of____and____constraints
Ans: Unique and Not Null

35._____String function of oracle will trim off unwanted characters from the both sides of string
Ans: trim


1 comment:

  1. Alcohol became something that I couldn’t control despite how miserable it was making me. more information

    ReplyDelete