computers
The difference between the DELETE and TRUNCATE SQL clauses is:
The TRUNCATE clause deletes all rows in a database table, while the DELETE clause can have a WHERE condition and might or might not delete all rows in a table.
What is the INSERT command used for?
To insert data.
The FROM SQL keyword is used to ...
specify the table we are are selecting or deleting from.
The UNION SQL clause can be used with..
the SELECT clause only
Normalization is...
the process of arranging information stored in a database in a way, which removes redundancy and ambiguity.
Which of the following is a reserved SQL keyword?
FROM
Which of the following SQL clauses is used to enter data into a SQL table?
INSERT INTO
Which SQL keyword is used to retrieve a maximum value?
MAX
Can the SELECT clause list have a computed value like in the example below? SELECT CustomerName, UnitPrice * NumberofUnits FROM Sales
Yes.
Can you join a table to itself?
Yes.
Can you use both SELECT and WHERE SQL clauses in one SQL statement?
Yes.
Can you use the SQL JOIN and SQL HAVING clauses in one SQL statement?
Yes.
Can you use the UPDATE and SELECT clauses in one SQL statement?
You can if you use nested SQL statements
A trigger belongs to...
a single table in the database
The AVG SQL function returns the ...
average in the values in a group.
What is the correct order of the ">" and the "=" operators, when we want to specify greater or equal search condition?
>=
What is a foreign key?
A foreign key is a key field (column) in a database table, which relates the table to another table where the key is a primary key. The primary - foreign key relations are used to cross-reference database tables
What is a stored procedure?
A set of SQL statements stored and executed as a single entity.
If you don't specify ASC or DESC after a SQL ORDER BY clause, the following is used by default:
ASC
Which of the following is a SQL aggregate function
AVG
Which SQL functions is used to count the number of rows in a SQL query?
COUNT()
What does the CREATE TABLE statement do?
Creates a new database table
What is a database cursor?
Cursor is acronym for Current Set Of Records and is a database object pointing to a currently selected set of records.
Which SQL statement inserts data into a table called Projects?
DELETE
Which of the following commands is used to delete data from a SQL database table?
DELETE
Which of the following is a reserved SQL keyword?
DELETE
Which SQL statement inserts data into a table called Projects
INSERT INTO Projects (ProjectName, ProjectDescription) VALUES ('Content Development', 'Website content development project')
Which of the following SQL clauses is used to select data from 2 or more tables?
JOIN
What does follow after the SQL SELECT clause?
List of columns that will be selected or the * symbol.
What does the term 'locking' refer to?
Locking is a process preventing users from reading data being changed by other users, and prevents concurrent users from changing the same data at the same time.
Which SQL keyword is used to retrieve a minimum value
MIN
Which of the following SQL clauses is used to sort a result set?
ORDER BY
The table rows are also known as...
Records
RDBMS stands for...
Relational Database Management System
Which of the following SQL statements selects the string 'Success'?
SELECT 'Success'
Which SQL statement selects all rows from a table called Products and orders the result set by ProductID column?
SELECT * FROM Products ORDER BY ProductID
Which of the following SQL statements selects the total number of orders from the Sales table? OrderNumber Date CustomerID 1. 12/12/2005. 13 2. 13/12/2005. 17
SELECT COUNT(*) FROM Sales
Which of the following SQL statements is correct?
SELECT CustomerName, COUNT(CustomerName) FROM Orders GROUP BY CustomerName
Which of the following statements gets the total value of the column 'Price' in the 'Sales' table?
SELECT SUM(Price) FROM Sales
What does the SQL FROM clause do?
Specifies the tables to retrieve rows from.
What is the purpose of the SQL AS clause?
The AS SQL clause is used change the name of a column in the result set or to assign a name to a derived column.
What does the FROM SQL keyword specify?
The FROM SQL keyword specifies the tables, views, and joined tables used in SELECT, UPDATE and DELETE SQL statements.
What does the HAVING clause do?
The HAVING keyword specifies a search condition for an aggregate or a group.
What is a primary key?
The primary key is a column or combination of columns whose values uniquely identify each row in the table
What is the ABS SQL function used for?
To return the absolute, positive value of a numeric expression.
Sub-queries can be nested in...
UPDATE, DELETE, INSERT and SELECT statements.
Which of the following SQL clauses specifies a search condition?
WHERE
The LIKE SQL keyword is used along with ...
WHERE clause.
The CREATE TABLE statement is used to...
create a new database table.
The primary - foreign key relations are used to ...
cross-reference database tables.
The UPDATE SQL clause can...
update more than one row at a time.