SQL Testing
DataBase
DBMS Vs RDBMS
SQL Tutorials
SQL DataTypes
SQL Operators
SQL Statements
DDL (Data Definition Language)
SQL-Create Table
SQL-Alter Table
SQL-Drop Table
SQL-Truncate Table
DML (Data Manipulation Language)
SQL-Select Statement
SQL-Insert Statement
SQL-Update Statement
SQL-Delete Statement
SQL Constraints
SQL-Not Null Constraint
SQL-Unique Constraint
SQL-Primary Key Constraint
SQL-Foreign Key Constraint
SQL-Check Constraint
SQL Special Operators
SQL-IN Operator
SQL-LIKE Operator
SQL-BETWEEN Operator
SQL Sorting (Order By)
SQL Group By
SQL Aggregate Function
SQL Having
SQL Joins
SQL-Cross Join
SQL-Inner Join
SQL-Left Outer Join
SQL-RIGHT Outer Join
SQL-Self Join
SQL SubQueries
ISQL-Independent Sub Queries
SQL-Correlated Sub Queries
SQL Views
SQL Index
SQL Create Table Statement
SQL CREATE TABLE statement is used to create table in a database.
We can create many tables in a database.
Create Table Syntax
The basic syntax of the CREATE TABLE statement is as follows −
CREATE TABLE  Table_name (column_name1  data_type(size), column_name2   data_type(size), column_name3   data_type(size), ……………………………… ……………………………… column_namen   data_type(size));
Example
CREATE TABLE Employee(
EmployeeIDÂ Â Â Â Â Â Â Â Â Â Â Â Â INTÂ Â Â Â Â NOT NULL PRIMARY KEY AUTO_INCREMENT,
Employee_FirstName      VarChar(30) ,
Employee_LastName      VarChar(20),
DepartmentIDÂ Â Â Â Â Â Â Â Â Â Â INT,
DepartmentName        VarChar(10),
EmployeeEmail          VarChar(10),
CITYÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â VarChar(10),
Salary                 DECIMAL
);
Statement to check whether a table exists or not in a database and the description of the table.
Syntax
DESC TableName;
Example
DESC Employee;
SQL Testing
DataBase
DBMS Vs RDBMS
SQL Tutorials
SQL DataTypes
SQL Operators
SQL Statements
DDL (Data Definition Language)
SQL-Create Table
SQL-Alter Table
SQL-Drop Table
SQL-Truncate Table
DML (Data Manipulation Language)
SQL-Select Statement
SQL-Insert Statement
SQL-Update Statement
SQL-Delete Statement
SQL Constraints
SQL-Not Null Constraint
SQL-Unique Constraint
SQL-Primary Key Constraint
SQL-Foreign Key Constraint
SQL-Check Constraint
SQL Special Operators
SQL-IN Operator
SQL-LIKE Operator
SQL-BETWEEN Operator
SQL Sorting (Order By)
SQL Group By
SQL Aggregate Function
SQL Having
SQL Joins
SQL-Cross Join
SQL-Inner Join
SQL-Left Outer Join
SQL-RIGHT Outer Join
SQL-Self Join
SQL SubQueries
ISQL-Independent Sub Queries
SQL-Correlated Sub Queries
SQL Views
SQL Index
Â
- Â
Â
Â
Â
Â
Â
Â
Â
- Â