
 
		
	- Forum
 
	- Databases
 
		
	- SQL Server - How to rename a column name in SQL Server 2000
 
	
	
 
 
 
	
		
		
	
	
	
	
	
		
			
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					How to rename a column name in SQL Server 2000
				
				
						
							
							
						
						
				
					
						
							How to rename ( change ) a column name in SQL Server 2000?
I tried the following queries... Its not working
atler table  change 
alter table rename  to 
both change and rename keywords are not supporting.
Kindly send ASAP.
Thanks in advance,
Vishnu
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
		
			
				
				
				
					Re: How to rename a column name in SQL Server 2000
				
				
						
						
				
					
						
							please try this
EXEC sp_rename 
@objname= 'table_name.old_column_name', 
@newname = 'new_column_name', 
@objtype = 'COLUMN'
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
			
			
				Junior Member
			
			
			
			
				
					
						
					
				
			
			 
			
				
				
				
				
				
					    
				
			
		 
		
			
				
				
				
					Re: How to rename a column name in SQL Server 2000
				
				
						
						
				
					
						
							Ya its working fine... thanks
I found one more solution... In enterprise manager, select the database-> diagrams and u can rename in that diagram by just clicking it...
Thanks,
Vishnu
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
- 
	
	
		
		
			
				
				
				
					Re: How to rename a column name in SQL Server 2000
				
				
						
						
							
						
				
					
						
							That is for the GUI tool,the easiest option. What i suggested you is from command, which can also be called from any programming language / front end tool.
						
					 
					
				 
			 
			
			
		 
	 
		
	
 
                                             
		
		
		
	
 
	
	
	
	
	
	
	
	
	
	
	
	
		
		
			
				
				Posting Permissions
			
			
				
	
		- You may not post new threads
 
		- You may not post replies
 
		- You may not post attachments
 
		- You may not edit your posts
 
		-  
 
	
	
	Forum Rules