With SQL, how do you select all the records from a table named "Persons" where the "LastName" is alphabetically between (and including) "Hansen" and "Pettersen"?
SELECT LastName>'Hansen' AND LastName<'Pettersen' FROM Persons
SELECT * FROM Persons WHERE LastName>'Hansen' AND LastName<'Pettersen'
SELECT * FROM Persons WHERE LastName BETWEEN 'Hansen' AND 'Pettersen'......
Which SQL statement is used to return only different values?
SELECT UNIQUE
SELECT DIFFERENT
SELECT DISTINCT.....
With SQL, how can you return the number of records in the "Persons" table?
SELECT COUNT() FROM Persons
SELECT COLUMNS() FROM Persons
SELECT COLUMNS(*) FROM Persons
SELECT COUNT(*) FROM Persons ....
What does SQL stand for?
Strong Question Language
Structured Query Language
Structured Question Language.....
Which SQL statement is used to extract data from a database?
OPEN
SELECT
GET
EXTRACT....
Which SQL statement is used to update data in a database?
SAVE AS
SAVE
MODIFY.....
In this SQL statement, which of the following lines will produce an error?
CREATE OR REPLACE TRIGGER check_age
BEFORE INSERT OR UPDATE ON employee FOR EACH ROW
IS
years_old NUMBER;......
In this PL/SQL statement, which of the following lines will produce an error?
create or replace function vat (vat_rate IN NUMBER, price IN NUMBER)
declare
l_vat NUMBER;
begin .......
What output will the follwing statement produce? Select NVL2(NULL,'NOT NULL', NULL) from dual;
NULL
NOT NULL
Function NVL2 is not defined
None of the above........
Which three definitions are associated with implicit cursors?
%rowtype, %toomanyrows, %found
%found, %notfound, %rowcount
%rowtype, %rowcount, %notfound
None of the above .......
Which SQL keyword is used to retrieve a minimum value?
DOWN
LOW
MIN
LOWER.....
The INNER JOIN clause?
returns all rows that have matching value in the field on which the 2 tables are joined.
returns only the rows from the first table, which have non-matching values with the second table in the field on which the 2 tables are joined.
returns all rows from 2 tables.
returns all the matching rows from 2 tables. .........
What does SQL stand for?
Structured Question Language
Strong Question Language
Structured Query Language
Structured Queue Language......
What does the SQL FROM clause do?
Specifies a search condition.
Specifies the tables to retrieve rows from.
Specifies the columns we are retrieving
Specifies the attributes to retrieve rows from. ......
In an SQL query, which built-in function is used to total numeric columns?
A) AVG
B) COUNT
C) MAX
D) SUM.......
In an SQL query, which built-in function is used to obtain the smallest value of numeric columns?
A) AVG
B) COUNT
C) MAX
D) MIN.....
For the relation Supplies(Snumber,Pnumber,Qty), which of the following SQL statements corresponds
to a relational algebra project and selection operators?
a. Select Snumber From Supplies; .....
In an SQL query, which SQL keyword is used to join two conditions that both must be true for the rows
to be selected?
A) AND
B) EXISTS
C) HAVING
D) IN.......
In an SQL query, which SQL keyword is used to determine if a column value is equal(=) to any one of a
set of values?
A) AND
B) EXISTS
C) HAVING
D) IN......
In an SQL query, which SQL keyword is used with GROUP BY to select groups meeting specified
criteria?
A) AND
B) EXISTS
C) HAVING
D) WHERE.....
Which SQL keyword is used to name a new table and describe the table's columns?
A) SET
B) CREATE
C) ALTER
D) MODIFY.....
In an SQL query, which SQL keyword must be used to remove duplicate rows from the result table?
A) DELETE
B) DISTINCT.....
A composite primary key can be defined using the CONSTRAINT phrase in which SQL command?
a. MODIFY TABLE.
b. CHANGE TABLE.
c. CREATE TABLE.
d. BUILD TABLE........ When the primary key of one relation is placed into a second relation, it is called a:
a. referential integrity.
b. foreign key.
c. candidate key.
d. relocated key.......