SQL Server Express Database Management

AffableJuniper avatar
AffableJuniper
·
·
Download

Start Quiz

Study Flashcards

8 Questions

Which data type should you use for a column that will store text up to 255 characters?

VARCHAR(255)

Which SQL clause is used to filter records returned by a SELECT statement?

WHERE

What is the purpose of the SQL SELECT keyword?

To retrieve data from a database

Which SQL command can be used to modify the structure of an existing table?

ALTER TABLE

What is the keyword for sorting records in ascending order?

ASC

Which SQL statement is used to add new records to a table?

INSERT INTO

How would you specify that a certain column in a table does not accept NULL values?

NOT NULL

Which function is used to return the number of records in a result set?

COUNT()

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 three VARCHAR columns named firstName, lastName, and studentID 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 to California 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 an UPDATE statement to change the value of a matching column.

This quiz covers basic database management concepts using SQL Server Express, including selecting a database, creating a table, and sorting database records.

Make Your Own Quizzes and Flashcards

Convert your notes into interactive study material.

Get started for free
Use Quizgecko on...
Browser
Browser