Results 1 to 14 of 14
  1. #1
    Join Date
    Jun 2003
    Posts
    20

    Unanswered: How to add comment to a table column in TOAD for SQL Server

    Hi guys, I am using TOAD for SQL Server. I dont know how can I add a comment to a table column. The comment firld is simiply not writable. Please see the pic in the attachment for details...
    Attached Thumbnails Attached Thumbnails untitled.JPG  

  2. #2
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    TOAD for SQL Server. Blech......
    If TOAD is storing the comments with the table definition, then the comment property would need to be added to the database table columns. It does not exist by default, so I would expect that TOAD would add it and you probably missed or skipped a step in your configuration.
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  3. #3
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by blindman
    TOAD for SQL Server. Blech......
    why the negative comment?

    just curious, as i've heard good things about toad
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  4. #4
    Join Date
    Sep 2005
    Posts
    161
    I use it when I'm writing SQL scripts because of the auto code completion and code folding. Code completion can be a real time saver when writing scripts.

    For example: (insert happy sql coding music here). Hmmm, I wonder if that column is lastname or last_name. Grrr. Let me check the table definition again. Wait, Toad can show me a list in my editor.

    Sql Server 2008 query editor will have code completion.

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    You've heard good things about TOAD from user of Oracle, or other database platforms that don't come supplied with an admin tool.

    When an Oracle DBA says "TOAD is Fantastic!", he does not realize that what he is actually saying is "TOAD is better than Nothing!".
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jun 2003
    Posts
    20
    Thnx for the reply guys. Just wondering is there a way to add comment to a table column in SQL Server? And can I view the table column comments in SSMS in SQL Server 2005?

  7. #7
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The Quest geeks are excellent if you log in and submit a question.

    I know that there is a way to add comments to just about anything in SQL Server using TOAD, but I've never spent enough time with TOAD to figure out the steps needed to do it.

    -PatP

  8. #8
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    Quote Originally Posted by coolioo
    And can I view the table column comments in SSMS in SQL Server 2005?
    you can, but it's about 18 mouse clicks.

    1. from OE, navigate to the database/table/column of interest.
    2. right click on the column, select properties.
    3. in the dialog that pops up, select "extended properties"
    4. in this tab, you can view/edit the comments on the column.

    If you are looking for a way to document your database, you might also want to check out sqlspec. see the link in my sig.

  9. #9
    Join Date
    Jun 2003
    Posts
    20
    Quote Originally Posted by blindman
    TOAD for SQL Server. Blech......
    If TOAD is storing the comments with the table definition, then the comment property would need to be added to the database table columns. It does not exist by default, so I would expect that TOAD would add it and you probably missed or skipped a step in your configuration.
    I have tried add Comment and MS_Description as the extended property for table columns, but they are not displayed in the Comment field in TOAD.

    Any solutions??

  10. #10
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    you could try turning on the profiler to see what query TOAD is issuing to populate the dialog. it may be that they aren't fetching anything for that field and always show a blank. profiler is a quick way to find out.

  11. #11
    Join Date
    Jun 2003
    Posts
    20
    Just got feedback from Quest Software support. They said "The comment is extracted from the source code. I will check with the developers if there are ways to enter the comment through the GUI."

    Extracted from the source code?? That is weird...

  12. #12
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    there is no "source code" for tables stored anywhere by the server in MS SQL Server. it does store the DDL for other objects such as views/procs/udfs. but not tables.

    I think their support staff was just giving an answer. not necessarily the right one. but an answer.

  13. #13
    Join Date
    Nov 2003
    Posts
    2,934
    Provided Answers: 12
    I think there is no real support for comments in SQL Server. If you e.g. look at the documentation (and source code) of sp_help you'll find that it will always return NULL for the comments (or remarks, don't remember how it's named) column.

    The MS JDBC driver relies on sp_help to return table information, so through a JDBC application it will never be possible. I can imagine that other layers also use the system stored procedures to retrieve that information and thus comments are simply not possible in SQL Server. At least for me.

  14. #14
    Join Date
    May 2004
    Location
    Seattle
    Posts
    1,313
    there is support for comments, but not all clients support them, is how I would put it.

    TOAD is a client. a client using JDBC to access SQL Server is also a client.

    comments are implemented with extended properties.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •