Programming Terms

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

What is LIMIT?

A clause that lets you specify the maximum number of rows the result set will have.

What is ORDER BY?

A clause that sorts the result set alphabetically or numerically

What is LIKE?

A special operator that can be used with the WHERE clause to search for a pattern

What code would you add to this query to order colors by name alphabetically (Z to A)? SELECT * FROM colors _________________________;

ORDER BY name DESC

What is the correct query to select only the cities with temperatures less than 35?

SELECT * FROM cities WHERE temperature <35;

How would you query all the unique genres from the books table?

SELECT DISTINCT genres FROM books;

Which operatory would you use to query values that meet ALL conditions in a WHERE clause?

AND

Find the error in this code: SELECE name, CASE WHEN imdb_rating >8 THEN 'Oscar' WHEN imdb_rating >7 THEN 'Good' WHEN imdb_rating >6 THEN 'Fair' FROM movies;

Missed END

IS NULL condition return true if the field is empty.

TRUE

LIKE and BETWEEN

are special operators

AND and OR

combines multiple conditions

CASE

creates different outputs

WHERE

is a popular command that lets you filter the results of the query based on conditions that you specify

SELECT

is the clause we use everytime we want to query information from a database.

What does the wildcard character % in the following SQL statement do? SELECT * FROM sports WHERE name LIKE '%ball';

it matches all sports that end with 'ball'

What is the correct syntax to query both the name and date columns from the database? SELECT _____________ FROM album;

name, date

AS

renames a column or table

DISTINCT

return unique values

ORDER BY

sorts the result

LIMIT

specifies the maximum number of rows that they query will return

Which of the following is NOT a comparison operator in SQL?

~ Comparison operators are =, !=, >, <, >=, <=.


Kaugnay na mga set ng pag-aaral

Urinary/Reproductive Systems Evolve

View Set

Google Cloud Certified Associate Cloud Engineer

View Set

Anatomy Ch. 11 Cardiovascular Multiple Choice

View Set

Lesson 7: Implementing Authentication Controls

View Set

Lesson 2 Study Guide: The Origins and Spread of Christianity

View Set

CPP MI Exam 3 practice questions

View Set

LearningCurve: 8b. Storing and Retrieving Memories

View Set