GeekInterview.com
Series: Subject: Topic:
Question: 11 of 214

How to rename or change table name in sql?

Asked by: shojol | Member Since Mar-2012 | Asked on: Mar 30th, 2012

View all questions by shojol

Showing Answers 1 - 4 of 4 Answers
Vaibhav

Answered On : Apr 2nd, 2012

Code
  1. ALTER TABLE table_name
  2. RENAME TO new_table_name;
  3. Example:-
  4. ALTER TABLE departments
  5. RENAME TO dept ;
  6.  

Yes  1 User has rated as useful.
  
Login to rate this answer.
ravinder

Answered On : May 4th, 2012

alter table table_name_old rename to table_name_new;

  
Login to rate this answer.

SQL >> rename table_name1 to new_table_name;

  
Login to rate this answer.
shikha

Answered On : Feb 3rd, 2013

sp_RENAME old_table_name, new_table_name

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.