SQL Tutorial Stage-1
SQL Tutorial Stage-1
Assume you have to create a table named EMP and perform some operations on it. Let the structure of this table as: Field/Column Name EmpID EmpName DOB salary Dept Type Integer string datetime double string Size 5 30 7,2 10
Table Creation
To create this table in SQL Server, use the following SQL Command Create Table Emp ( EmpID integer, EmpName varchar(30), DOB datetime, Salary decimal(7,2), Dept varchar(20) )
Note: SQL is case insenstive language for example Create can be wrtting as CREATE or create or CreATE; it doest Matter.
Select Name, Salary from Emp where EmpID = 1001 For Employee ID = 1001, name and salary will be seleted from Emp table
To Delete Table
To delete table from, the following SQL Command Drop table Emp