Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-27 : 08:33:46
|
I am trying to find out whether there is a extended procedure that will allow you to add a comment or desription on a table. I have searched BO and can't seem to find the info I am looking for.For example, I have a table named Backorders and when I need to find out generally what information this table contains, I want to look at the description or comment like "This table contains all Backorders since May 15, 2001".For the anyone with Oracle experience, I am looking for functionality similar to adding a comment to an Oracle table.Jeremy |
|
Nazim
A custom title
1408 Posts |
Posted - 2002-03-27 : 08:39:11
|
i dont think therez anything like that with Sql Server. And if it was there too am curious how would you see it ( with sql server most probably with sysobjects . and therez nothing like description column as of now in it, but who knows Yukon might contain one-------------------------------------------------------------- |
|
|
Jay99
468 Posts |
Posted - 2002-03-27 : 09:08:00
|
If it is that important, you could create a MYsystabledesc . . .Jay<O> |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-27 : 09:34:08
|
I figured I might have to create my own table and link it to the id column in sysobjects. Basically, we have a database that maintains historical data and right now, I am the only one that knows the exact information contained in all the tables. If I am gone, I need other users within a certain group to be able to get a general idea of what is in the table, in case they have to pull information. This will keep them from having to view each table's columns to determine if it is the table they want to use. I also need to use the same for SP and views.Knowing that neither Nazim or Jay have seen anything like this, my guess is that it doesn't exists. Thanks for the quick reply guys. Jeremy |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2002-03-27 : 11:16:07
|
If you have Visio, or other software for database and entity-relationship design, they can reverse-engineer your database and build an E-R diagram for you. Then you can annotate this to your heart's content. If you really want to have full documentation on your database, this is the way to go. Adding a description table to your database is a convenience, but it's not a replacement for a full E-R diagram. Not to mention that a visual diagram of the database will be much easier and faster for others to understand. |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-27 : 12:29:29
|
Thanks for the advice robvolk.For this particular database, E-R does not really exist. The database is used to store historical data that is usually unrelated. Basically instead of storing the information on individual access databases, we wanted a single database centrally located to access the information as needed. When new people are added and need to run queries against the database, I wanted to give them a head start on what information in contained in a table or view and what each SP is set up to accomplish, including any paramaters necessary. Around here, you are asked to do something and sometimes not given enough directions such as specifically which able I can find that information in. Jeremy I have posted the script I generated at the following: [url]http://www.sqlteam.com/Forums/topic.asp?TOPIC_ID=14326[/url] |
|
|
davidpardoe
Constraint Violating Yak Guru
324 Posts |
Posted - 2002-03-28 : 06:04:46
|
I came across the undocumented system table SYSPROPERTIES when I was looking at column descriptions. I noticed that you can add these in Enterprise Manager - in Design Table there is a properties sheet for each column... I turned on a trace in SQL Profiler to see what happened when I added a description. Low and behold it updated the SYSPROPERTIES table.The table is available in SQL Server 2000 and is used to stored extended properties for any object - you could definitely get a table description in here.Check out the following for more help...http://www.devx.com/premier/mgznarch/vbpj/2001/05may01/sq0501/sq0501.asp(This article starts out by describing exactly what you are after - a table description)http://www.swynk.com/friends/achigrik/UndocSQL2000Tbl.asp#part_2_8============================Chairman of The NULL Appreciation Society"Keep NULLs as NULL" |
|
|
joldham
Wiseass Yak Posting Master
300 Posts |
Posted - 2002-03-28 : 08:16:29
|
Thanks David. I actually found this yesterday about 2 minutes before I left work for the evening and before I could research it and post the results here. Good catch! Jeremy |
|
|
|
|
|
|
|