0

databases Online Quiz - 216

Description: databases Online Quiz - 216
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0

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

  1. True

  2. False


Correct Option: B

With SQL, how can you return all the records from a table named "Persons" sorted descending by "FirstName"?

  1. SELECT * FROM Persons SORT BY 'FirstName' DESC

  2. SELECT * FROM Persons SORT 'FirstName' DESC

  3. SELECT * FROM Persons ORDER BY FirstName DESC

  4. SELECT * FROM Persons ORDER FirstName DESC


Correct Option: C

Which SQL statement is used to extract data from a database?

  1. OPEN

  2. EXTRACT

  3. SELECT

  4. GET


Correct Option: C

Which SQL statement is used to update data in a database?

  1. UPDATE

  2. MODIFY

  3. SAVE

  4. SAVE AS


Correct Option: A

Which SQL statement is used to insert new data in a database?

  1. ADD NEW

  2. INSERT INTO

  3. ADD RECORD

  4. INSERT NEW


Correct Option: B

What does SQL stand for?

  1. Strong Question Language

  2. Structured Query Language

  3. Structured Question Language

  4. Strong Query Language


Correct Option: B

With SQL, how do you select all the columns from a table named "Persons"?

  1. SELECT * FROM Persons

  2. SELECT [all] FROM Persons

  3. SELECT Persons

  4. SELECT FROM Persons


Correct Option: A

Which SQL statement is used to return only different values?

  1. SELECT DIFFERENT

  2. SELECT UNIQUE

  3. SELECT DISTINCT

  4. SELECT EXACT


Correct Option: C

With SQL, how can you insert a new record into the "Persons" table?

  1. INSERT INTO Persons VALUES ('Jimmy', 'Jackson')

  2. INSERT VALUES ('Jimmy', 'Jackson') INTO Persons

  3. INSERT ('Jimmy', 'Jackson') INTO Persons

  4. INSERT VALUES ('Jimmy', 'Jackson')


Correct Option: A

With SQL, how can you insert "Olsen" as the "LastName" in the "Persons" table?

  1. INSERT INTO Persons (LastName) VALUES ('Olsen')

  2. INSERT ('Olsen') INTO Persons (LastName)

  3. INSERT INTO Persons ('Olsen') INTO LastName

  4. INSERT INTO Persons ('Olsen')


Correct Option: A
  1. DELETE ROW FirstName='Peter' FROM Persons

  2. DELETE FROM Persons WHERE FirstName = 'Peter'

  3. DELETE FirstName='Peter' FROM Persons

  4. REMOVE FROM Persons WHERE FirstName = 'Peter'


Correct Option: B

Which SQL statement is used to delete data from a database?

  1. DELETE

  2. COLLAPSE

  3. REMOVE

  4. ERASE


Correct Option: A

With SQL, how do you select a column named "FirstName" from a table named "Persons"?

  1. EXTRACT FirstName FROM Persons

  2. SELECT FirstName FROM Persons

  3. SELECT Persons.FirstName

  4. SELECT * FROM Persons


Correct Option: B

With SQL, how do you select all the records from a table named "Persons" where the "FirstName" is "Peter" and the "LastName" is "Jackson"?

  1. SELECT * FROM Persons WHERE FirstName='Peter' AND LastName='Jackson'

  2. SELECT FirstName='Peter', LastName='Jackson' FROM Persons

  3. SELECT * FROM Persons WHERE FirstName<>'Peter' AND LastName<>'Jackson'

  4. SELECT * FROM Persons WHERE FirstName='Jackson' AND LastName='Peter'


Correct Option: A
  1. SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName

  2. SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'

  3. SELECT LastName>'Hansen' AND LastName

  4. SELECT LastName<>'Hansen' AND LastName<>'Pettersen' FROM Persons


Correct Option: B

Which SQL statement defines a FOREIGN KEY constraint on the DEPT NO column of the EMP table?

  1. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) NOT NULL, CONSTRAINT emp_deptno_fk FOREIGN KEY deptno REFERENCES dept deptno);

  2. CREATE TABLE EMP (empno NUMBER(4), ename VARCHAR2(35), deptno NUMBER(7,2) CONSTRAINT emp_deptno_fk REFERENCES dept (deptno));

  3. CRETE TABLE EM (empno NUMBER(4), ename VARCHAR2(35) deptno NUMBER (7,2) NOT NULL, CONSTRAINT em_deptno_fk REFERENCES dept (deptno) FOREIGN KEY (deptno));

  4. CREATE TABLE EMP (empno NUMBER (4), ename VARCHAR2(35), deptno NUMBER(7,2) FOREIGN KEY CONSTRAINT emp deptno fk REFERENCES dept (deptno));


Correct Option: B

Evaluate the set of SQL statements: CREATE TABLE dept (deptbi NUMBER (2) dname VARCHAR2(14), Ioc VARCHAR2(13)); ROLLBACK; DESCRIBE DEPT What is true about the set?

  1. The DESCRIBE DEPT statement displays the structure of the DEPT table

  2. The ROLLBACK statement frees the storage space occupied by the DEPT table.

  3. The DESCRIBE DEPT statement returns an error ORA-04043: object DEPT does not exist

  4. The DESCRIBE DEPT statement displays the structure of the DEPT table only if there is a COMMIT statement introduced before the ROLLBACK statement.


Correct Option: A

Which two are attributes of /SQL* Plus? (Choose two).

  1. /SQL * Plus commands cannot be abbreviated

  2. /SQL* Plus commands are accessed from a browser.

  3. /SQL*Plus commands are used to manipulate data in tables

  4. /SQL* Plus command manipulate table definitions in the database

  5. /SQL* Plus is the Oracle proprietary interface for executing SQL statements.


Correct Option: C,E

Is the database and DBMS software together is called as Database system?

  1. True

  2. False


Correct Option: A

which of the following are the advantages of DBMS? (Select 2)

  1. Redundancy is controlled

  2. graphical and statistical capabilities

  3. proprietary formats may limit arichival quality of data

  4. Providing multiple user interfaces


Correct Option: A,D
- Hide questions