13 Jul 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:
1 2 3 |
create database amitdb; |
Now, create a table employee using the CREATE TABLE command. We have four fields, employee id, name, city and salary:
1 2 3 4 5 6 7 8 |
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:
No Comments