We recommendAustraliaIndian.com  ,AlvarezPigeons.com  ,AttractionsToGo.com
 
3:31 PM EST.The ultimate source for Indian Resources in USA, Canada and UK.Sign In!
    Home
  U.S.A.
  UK
  Canada
  Software Links
  Vastu
  My Account
  About Us  

How Rename a Column or Table in SQL SERVER

Category: Web Development > SQL Server
Entry Date: 7/14/2010 1:06:57 PM
A table name can be changed by using sp_RENAME function

Transact-SQL Syntax :



Where 'object_type' is the type of object being renamed. object_type is varchar(13), with a default of NULL, and can be one of these values. The Values for 'object_type' are

Value Description
COLUMN A column to be renamed.
DATABASE
INDEX A user-defined index.
OBJECT An item of a type tracked in sys.objects. For example, OBJECT could be used to rename objects including constraints (CHECK, FOREIGN KEY, PRIMARY/UNIQUE KEY), user tables, and rules.
USERDATATYPE An alias data type or CLR User-defined Types added by executing CREATE TYPE or sp_addtype.


The script for renaming any object (database, table, sp etc) :





The script for renaming any column



Shiju Mathews
User Comments/reviews

Add a New Comment/Review
Display Name
Email Address:
 
Title:
Comment/ Review/Posting
( 1012 Charectors maximum)
Rating:     ( 1- Not Recommended  5- Highly Recommended)


Related Blogs


CourtesyIndia.com
 Home | Visitor Agreements | Privacy PolicyFAQ

  Home
  U.S.A. Links
  UK Links
  Canada Links
  Software Links
  AirLine Tickets
  U.S.A. Links
  Churches
  Restaurants
  Associations
  Hindu Temples
  Grocery Stores
  Garment Stores
  Jewelry Stores
  Online Grocery
  Travel Agents
  UK Links
  Restaurants
  Grocery Stores
  Churches
  Canada Links
  Churches
  Restaurants
  Associations
  Grocery Stores
  Hindu Temples
  Jewelry Stores
  Garment stores
  Vastu
  Software Links
  Blogs
  Interview Center
  Tips and Tricks
  My Account
  Log In
  New Account
  Change Password
  Personal Profile
  Manage Resources
  About Us
  Site Map
  Contact Us
  Feed Back
  Add to Listing