Podcast
Questions and Answers
Which data type should you use for a column that will store text up to 255 characters?
Which data type should you use for a column that will store text up to 255 characters?
Which SQL clause is used to filter records returned by a SELECT statement?
Which SQL clause is used to filter records returned by a SELECT statement?
What is the purpose of the SQL SELECT keyword?
What is the purpose of the SQL SELECT keyword?
Which SQL command can be used to modify the structure of an existing table?
Which SQL command can be used to modify the structure of an existing table?
Signup and view all the answers
What is the keyword for sorting records in ascending order?
What is the keyword for sorting records in ascending order?
Signup and view all the answers
Which SQL statement is used to add new records to a table?
Which SQL statement is used to add new records to a table?
Signup and view all the answers
How would you specify that a certain column in a table does not accept NULL values?
How would you specify that a certain column in a table does not accept NULL values?
Signup and view all the answers
Which function is used to return the number of records in a result set?
Which function is used to return the number of records in a result set?
Signup and view all the answers
Study Notes
Working with Databases and SQL Server Express
Selecting a Database
- The
USE
keyword is used to select the database you want to work with.
Creating a Table
- The correct syntax to create a table named
students
with threeVARCHAR
columns namedfirstName
,lastName
, andstudentID
is:CREATE TABLE students (firstName VARCHAR(25), lastName VARCHAR(25), studentID VARCHAR(10));
Sorting Database Records
- The
DESC
keyword is used to perform a reverse sort of database records.
Filtering Records
- The correct string for a filter that narrows a recordset to include only records where the
State
field is equal toCalifornia
is:"WHERE State = 'California'"
- The
WHERE
clause is used to specify a condition for which records to include in a result set.
Updating Records
- The
SET
keyword is used in anUPDATE
statement to change the value of a matching column.
Studying That Suits You
Use AI to generate personalized quizzes and flashcards to suit your learning preferences.
Description
This quiz covers basic database management concepts using SQL Server Express, including selecting a database, creating a table, and sorting database records.