Database Tables  «Prev  Next»

Lesson 5 Basic elements of a Transact-SQL statement, part 1
Objective Use Transact-SQL to create a basic database..

Transact-SQL Statement

To create a database, use the Transact-SQL statement CREATE DATABASE. The only thing that is required along with the statement is a name for the database, such as "employee." You can create a database with all the default values using a Transact-SQL statement as simple as: CREATE DATABASE employee Without specifying any additional parameters, the following defaults are created:
The series of images below reviews the available syntax for the CREATE DATABASE statement:
  create-database1
  create-database2
  create-database3
  create-database4
  create-database5
  create-database6
  create-database6

create-database6

In the next lesson, we will take a look at control-of-flow logic, which enables you to test the value of a variable and take an action based on that value.
SEMrush Software