Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


how to rename the table

Answers were Sorted based on User's Feedback



how to rename the table..

Answer / rajkumar

SP_RENAME 'OLDTABLE NAME', 'NEW TABLE NAME'
eg:
SP_RENAME 'TBL_EMPLOYEE', 'TBL_EMP'

Is This Answer Correct ?    11 Yes 3 No

how to rename the table..

Answer / vishal

Rename a table using sp_rename

sp_rename <Old Table Name>, <New Column Name>


Rename a column using sp_rename
here as third argument we have to provide column. default
third argument for sp_rename is table.


sp_rename <table name>.<old Column Name>, <New Column Name>,
'column'

Is This Answer Correct ?    2 Yes 0 No

how to rename the table..

Answer / mohan

Rename a table
This example renames the customers table to custs.

EXEC sp_rename 'customers', 'custs'

B. Rename a column
This example renames the contact title column in the
customers table to title.

EXEC sp_rename 'customers.contacttitle', 'title', 'COLUMN'

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More SQL Server Interview Questions

Can we use pragma autonomous_transaction in trigger?

0 Answers  


Your sql server is running out of disk space. You notice that there are several large files with ldf extensions what are these files?

0 Answers  


What are dml triggers and types of dml triggers?

0 Answers  


What is de-normalization and what are some of the examples of it?

0 Answers  


How will you add a dimension to cube? : sql server analysis services, ssas

0 Answers  


How to create database with physical files specified in ms sql server?

0 Answers  


Explain comment on transactions?

0 Answers  


HOW TO FIND THE EMPLOYEE DETAILS WHO ARE GETTING SAME SALARY IN EMP TABLE

18 Answers   Infosys, TCS,


What is the recursive stored procedure in sql server?

0 Answers  


How to know the NAME of the Database and SIZE of the Database at the client node in Sql Server 2005

1 Answers  


What is the default fill factor value?

0 Answers  


What is the use of toad or sqldbx.?

0 Answers   MCN Solutions,


Categories