CoolInterview.com - World's Largest Collection of Interview Questions
Send Free SMS
 Interview Questions  
 Our Services  


INTERVIEW QUESTIONS MICROSOFT ASP.NET 2.0 DETAILS
Question :
How to rename a table using sql queries?


Category ASP.NET 2.0 Interview Questions
Rating (2.3) By 3 users
Added on 8/12/2006
Views 2362
Rate it!
Answers:

This done by

exec sp_rename 'oldTableName' , 'newTableName'



There are two ways of renaming a table.
1. Create table NewTableName As Oldtablename.
(this query copies everything to new table except the constraits.)
2. Rename table NewTableName Oldtablename.
(This query simply renames the original table leaving all the data and constraints intact.



 Posted by: Sachin Kaushik    

Contact Sachin Kaushik  Contact Sachin Kaushik

plz send me the detail of this coding
also the procedure



 Posted by: Pragnesh    

Contact Pragnesh  Contact Pragnesh

plz send me the detail of this coding
also the procedure



 Posted by: dharmveer9990368231    

Contact dharmveer9990368231  Contact dharmveer9990368231

The SQL Query for rename the Table:

exec sp_rename 'oldTableName' 'newTableName'

OR

RENAME TABLE student TO student_new



 Posted by: raja    

Contact raja  Contact raja


If you have the better answer, then send it to us. We will display your answer after the approval.
Name :*
Email Id :*
Answer :*
Verification Code Code Image - Please contact webmaster if you have problems seeing this image code Not readable? Load New Code
Process Verification  Enter the above shown code:*
Inform me about updated answers to this question

   
Related Questions
View Answer
Can a .NET web application consume Java web service ?

View Answer
Name some of the Microsoft Application Blocks. Have you used any? Which ones?

View Answer
How many classes can a single .NET DLL contain?

View Answer
Which control would you use if you needed to make sure the values in two different controls matched?

View Answer
How is a property designated as read-only?

View Answer
Which property on a Combo Box do you set with a column name, prior to setting the DataSource, to display data in the combo box?

View Answer
What tags do you need to add within the asp:datagrid tags to bind columns manually.

View Answer
What property do you have to set to tell the grid which page to go to when using the Pager object?

View Answer
What does WSDL stand for?

View Answer
What is the transport protocol you use to call a Web service SOAP

View Answer

Please Note: We keep on updating better answers to this site. Subscribe to our newsletter to get notified when better answer is posted.

Notify me when better answer is posted!
Email:

View ALL ASP.NET 2.0 Interview Questions

User Options
Sponsored Links


Copyright ©2003-2010 CoolInterview.com, All Rights Reserved.
Privacy Policy | Terms and Conditions
Page URL: http://www.coolinterview.com/interview/10647/default.asp?cachecommand=bypass


Download Yahoo Messenger | Placement Papers| FREE SMS | ASP .Net Tutorial | Web Hosting | Free SMS | Dedicated Servers | Joke of the Day

0.72