Basics of SQL Querying

Ace your homework & exams now with Quizwiz!

"What are the values "Genre" & "ReleaseDate" referred to in the following SQL query? SELECT m.Genre, m.ReleaseDate FROM Movies m"

Field Names

Which SQL keyword is used to combine rows from two or more tables?

JOIN

Which SQL keyword is used to sort the result-set?

ORDER BY

What is the name of the data that is returned from a query?

Result-Set

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

SELECT * FROM Persons

What does SQL stand for?

Structured Query Language

"What is wrong with the following SQL query? SELECT * FROM Users u WHERE u.FullName = Dwight Schrute"

The name Dwight Shrute should be encased in single quotes (ticks), such as 'Dwight Shrute'

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.

True

With SQL, which syntax is used to select a result that is not equal to a value?

!=

What is a Stored Procedure?

A prepared SQL code that you save so you can reuse the code over and over again.

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

SELECT FirstName FROM Persons

"What does the following SQL return?SELECT *FROM dbo.Employees eWHERE e.FirstName = 'Dwight'AND e.JobTitle = 'Assistant To The Regional Manager'"

Returns all columns where the first name of the employee is Dwight and they hold the job title of 'Assistant To The Regional Manager'

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

SELECT

With SQL, how do you select all records from a table named "Persons" where the value of the column "FirstName" starts with an "a"?

SELECT * FROM Persons WHERE FirstName LIKE 'a%'

With SQL, how do you select all records from a table named "Persons" where the value of the column "FirstName" is "Peter"?

SELECT * FROM Persons WHERE FirstName='Peter'


Related study sets

Health Assessment Chapter 18 Practice Questions

View Set

Sensation & Perception & Learning Pretest (2/20 - 3/5)

View Set

Chapter 6: Values, Ethics, and Advocacy, Ethical Systems of Healthcare, Healthcare & Ethics, Ch. 6 Values, Ethics, and Advocacy (PrepU), Ethical Healthcare and Genetics

View Set

ACCT3305 Ch9 - Current Liabilities and Contingent Obligations

View Set

Present Simple or Present Continuous?

View Set

Brokerage Exam - Missed Questions

View Set