TCO A You query the database with this command SELECT name F

(TCO A) You query the database with this command:
SELECT name
FROM employee
WHERE name LIKE \'_z_%\';
Which names are displayed? (Points : 3)

(TCO H) Explain the term columns.

Distinguish between the HAVING clause and the WHERE clause.

SQL is made up of statements or clauses. There are three types: What are those types of statements?

Solution

On doing name LIKE \'_z_%\', the names are displayed which can have any first character and have z as the second letter and any character as the third letter and can have 0 to any number of characters after that.

Basically _ represents a single character and % represents 0 to any number of characters.

WHERE clause introduces a condition on individual rows; HAVING clause introduces a condition on aggregations, i.e. results of selection where a single result, such as count, average, min, max, or sum, has been produced from multiple rows.

Types of statements:

Data Definition Language (DDL) Statements:
Data Definition Language (DDL) statements are used to define the database structure or schema. Some examples:

Data Manipulation Language:

Data Manipulation Language (DML) statements are used for managing data within schema objects. Some examples:

Data Control Language

Data Control Language (DCL) statements. Some examples:

(TCO A) You query the database with this command: SELECT name FROM employee WHERE name LIKE \'_z_%\'; Which names are displayed? (Points : 3) (TCO H) Explain th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site