sql rename table name code example

Example 1: rename table sql

ALTER TABLE STUDENTS  
RENAME TO ARTISTS;

Example 2: rename table sql server

USE AdventureWorks2012;   
GO  
EXEC sp_rename 'Sales.SalesTerritory', 'SalesTerr';

Example 3: modify column name in sql

ALTER TABLE `Table Name` MODIFY COLUMN `Column Name` Datatype(Size);

Example 4: rename column sql

ALTER TABLE nom_table
RENAME COLUMN colonne_ancien_nom TO colonne_nouveau_nom

Example 5: change column name sql

ALTER TABLE `db_name`.`table_name` 
	CHANGE `current_column_name` `new_column_name` datatype(size) NOT NULL COMMENT '';

Tags:

Misc Example