How to Create a Table in SQL

Learn how to create a new table after creating a database in Microsoft SQL Server. To create a table in SQL, use the CREATE TABLE statement.

Create a new table in SQL

First, we created a database amitdb in SQL using the CREATE DATABASE command:

create database amitdb;

Now, create a table employee using the CREATE TABLE command. We have four fields, employee id, name, city and salary:

create table employee (
  ID int,
  EmpName varchar(255),
  City varchar(255),
  Salary int
);

Video Tutorial – Create a Table

If you liked the tutorial, spread the word and share the link and our website Studyopedia with others:

Support us: DONATE


Read More:

How to Create a Database in SQL
How to Backup a Database in SQL
Studyopedia Editorial Staff
[email protected]

We work to create programming tutorials for all.

No Comments

Post A Comment