Menu

Create

Creating table in SQL is very simple. The syntax is in this following format

The command will create a temporary table called TEMP with four columns. PRIMARY KEY IDENTITY(1,1)  will make ID as a primary key and will start at 1 and automatically increase by 1. Without  IDENTITY(1,1), we need to manually put the entry in ID column.

Insert

The syntax is

If we need to add a new entry, we just need to repeat the same process.

Update

Let’s say we want to change some entry.

Or we can also change the entire column

Delete

We certainly can delete if we can create.

But if we choose to delete all records without deleting a table

Let’s add a new value and see the result

ID is 4.

Drop

To get rid of the entire table is DROP .

And if we were to select anything from that table