Basics of SQL Querying
"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'