SQL Testing
Introduction To RDMS
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
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 - Alter Table Statement
SQL ALTER TABLE is used to add, rename, modify or drop columns
RENAME A TABLE:
Syntax:
RENAME TABLE Existing_TableName TableName TO New_TableName
Example:
RENAME TABLE Employee TO Student
TO ADD A COLUMN:
Syntax:
ALTER TABLE TableName ADD ColumnName data_type;
Example:
ALTER TABLE Employee ADD Address VARCHAR(255);
Modify a column
Syntax:
ALTER TABLE TableName MODIFY ColumnName column_type;
Example:
ALTER TABLE Employee MODIFY EmployeeID int NOT NULL;
DROP A COLUMN:
Syntax:
ALTER TABLE TableName DROP COLUMN ColumnName;
Example:
ALTER TABLE Employee DROP COLUMN Address;
RENAME A COLUMN:
Syntax:
ALTER TABLE TableName  RENAME COLUMN Old_Name to New_Name;
Example:
ALTER TABLE Employee  RENAME COLUMN Address to Permanent_ADDRESS;
Recommended Articles:
SQL Testing
Introduction To RDMS
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
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