Wrox Programmer Forums
Go Back   Wrox Programmer Forums > SQL Server > SQL Server 2000 > SQL Server 2000
|
SQL Server 2000 General discussion of Microsoft SQL Server -- for topics that don't fit in one of the more specific SQL Server forums. version 2000 only. There's a new forum for SQL Server 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2000 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 16th, 2007, 05:46 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default Problem in Add colum and its Description

I am able to add new column/rename using alter table .


alter table Mytable add RegionID char(9) null


now I want to add column description for RegionID as 'ApproverRegions'

can i do it using alter table ???
or is there any way to do this,since I want dbScript.

I can directly open the table "mytable" in design mode and put the column over there
at the same time I can put Description as "It's Approver Region".

Is there any clue or pointer to do the same.

Awaiting for your reply



Cheers :)

vinod
__________________
Cheers :)

vinod
 
Old November 16th, 2007, 11:11 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

The description is an 'extended property' implemented in SQL Server. It is not part of the SQL Standard DML, so it cannot be accessed by DML code such as ALTER TABLE.

There are a number of system stored procedures sych as sp_addextendedproperty and sp_updateextendedproperty which allow you to create and/or update these things. IMO, they are more than a little annoying to use. YMMV.

Jeff Mason
[email protected]
 
Old November 23rd, 2007, 11:40 AM
Friend of Wrox
 
Join Date: Oct 2004
Posts: 553
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to vinod_yadav1919 Send a message via Yahoo to vinod_yadav1919
Default

HI Jeff!!
Great one, i was exactly looking on this,thank you very much !!

Cheers :)

vinod
 
Old November 23rd, 2007, 11:53 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 839
Thanks: 0
Thanked 1 Time in 1 Post
Default

BTW, I used the tem 'DML' (Data Manipulation Language) in my reply incorrectly, it should have been 'DDL' (Data Definition Language').

My apologies.

Jeff Mason
[email protected]





Similar Threads
Thread Thread Starter Forum Replies Last Post
Multi Colum Listbox JAdkins Classic ASP Basics 3 July 9th, 2007 01:40 AM
table colum break mateenmohd Classic ASP Basics 0 May 25th, 2007 10:10 AM
to get description of table MunishBhatia SQL Server 2000 2 December 5th, 2006 01:26 PM
Copy only numeric value from one colum hugoscp Word VBA 1 November 22nd, 2006 10:56 AM
Copy only numeric value from one colum hugoscp Excel VBA 2 October 16th, 2006 08:31 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.