Welcome Guest

DBMS Questions for AMDOCS

Q. No. :1
Question :Which of the following SQL commands can be used to modify existing data in a database table
A :
MODIFY
B :
UPDATE
C :
CHANGE
D :
NEW
Answer: B
Q. No. :2
Question : With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?
A :
SELECT * FROM Persons WHERE FirstName=='Peter' AND LastName=='Jackson'
B :
SELECT * FROM Persons WHERE FirstName LIKE 'Peter' AND LastName LIKE 'Jackson'
C :
SELECT FirstName='Peter', LastName='Jackson' FROM Persons
D :
SELECT * FROM Persons WHERE FirstName LIKE '%Peter%' AND LastName LIKE '%Jackson%'
Answer: B
Q. No. :3
Question :Which is true for AND & OR?
A :
These are Operators .Which are used to filter records based on more than one conditions.
B :
These Operators are used to join two tables.
C :
Never used in SQL
D :
None
Answer: A
Q. No. :4
Question :ThE FROM clause - EMPLOYEE LEFT OUTER JOIN DEPARTMENT
A :
includes all employees not assigned to any department
B :
includes all departments having no employee
C :
include only those employees who are assigned a department
D :
None
Answer: A
Q. No. :5
Question :The default character for specifying runtime variables in SELECT statements is
A :
Ampersand
B :
Ellipses
C :
Quotation marks
D :
Asterisk
Answer: A
Q. No. :6
Question :Several months ago, a user was created called bkup_admin for use with backups. A new backup program was purchased which needs all the rights of bkup_admin but needs to be called bkup_mgr. How would you go about removing bkup_admin and adding bkup_mgr?
A :
Simply use the RENAME command.
B :
Use the ALTER command.
C :
Export user bkup_admin, DROP with cascade user bkup_admin, Import using user to user.
D :
Export user bkup_admin, DROP user bkup_admin, Import using user to user.
Answer: C
Q. No. :7
Question :Which of the following group functions do not ignore NULL values?
A :
MAX
B :
COUNT
C :
SUM
D :
COUNT(*)
Answer: D
Q. No. :8
Question :Table Employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE. The SQL statement SELECT COUNT(SALARY) FROM EMPLOYEE WHERE SALARY NOT IN (NULL); prints
A :
10
B :
9
C :
5
D :
0
Answer: D
Q. No. :9
Question :User JANKO would like to insert a row into the EMPLOYEE table, which has three columns: EMPID, LASTNAME, and SALARY. The user would like to enter data for EMPID 59694, LASTNAME Harris, but no salary. Which statement would work best?
A :
NSERT INTO employee VALUES (59694,’HARRIS’, NULL);
B :
INSERT INTO employee VALUES (59694,’HARRIS’);
C :
INSERT INTO employee (EMPID, LASTNAME, SALARY) VALUES (59694,’HARRIS’);
D :
INSERT INTO employee (SELECT 59694 FROM ‘HARRIS’);
Answer: A
Q. No. :10
Question :Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * from MASTER.ANIMALS; What is the effect of this statement?
A :
A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS table owned by ANJU.
B :
A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table owned by MASTER.
C :
A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table owned by MASTER.
D :
A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table owned by ANIMALS.
Answer: C
Q. No. :11
Question :<> and != both are same operator into SQL
A :
True
B :
Flase
C :
Both are not used into SQL.
D :
Both are used assembly languages only.
Answer: A
Q. No. :12
Question :Which of the following is not a group function?
A :
avg( )
B :
sqrt( )
C :
sum( )
D :
max( )
Answer: B
Q. No. :13
Question :Omitting the WHERE clause from a DELETE statement has which of the following effects?
A :
The delete statement will fail because there are no records to delete.
B :
The delete statement will prompt the user to enter criteria for the deletion
C :
The delete statement will fail because of syntax error.
D :
The delete statement will remove all records from the table.
Answer: D
Q. No. :14
Question :Developer ANJU executes the following statement: CREATE TABLE animals AS SELECT * from MASTER.ANIMALS; What is the effect of this statement?
A :
A table named ANIMALS will be created in the MASTER schema with the same data as the ANIMALS table owned by ANJU.
B :
A table named ANJU will be created in the ANIMALS schema with the same data as the ANIMALS table owned by MASTER.
C :
A table named ANIMALS will be created in the ANJU schema with the same data as the ANIMALS table owned by MASTER.
D :
A table named MASTER will be created in the ANIMALS schema with the same data as the ANJU table owned by ANIMALS.
Answer: C
Q. No. :15
Question :Which command will delete all data from a table and will not write to the rollback segment?
A :
DROP
B :
DELETE
C :
CASCADE
D :
TRUNCATE
Answer: D
Q. No. :16
Question :Dropping a table has which of the following effects on a nonunique index created for the table?
A :
No effect.
B :
The index will be dropped.
C :
The index will be rendered invalid.
D :
The index will contain NULL values.
Answer: B
Q. No. :17
Question : Which SQL statement is used to delete data from a database?
A :
DELETE
B :
TRUNCATE
C :
REMOVE
D :
UPDATE
Answer: A