No subject


Sun Nov 20 20:48:46 GMT 2022


```
for MSSQL:

select t.name [Table], prop.value [TableComment]
from sys.tables t left join sys.extended_properties prop
on t.object_id = prop.major_id and prop.minor_id = 0 and prop.name = 'MS_Description'

select t.name [Table], c.name [Column], prop.value [ColumnComment]
from sys.tables t
inner join sys.columns c on t.object_id = c.object_id
left join sys.extended_properties prop
on t.object_id = prop.major_id and c.column_id = prop.minor_id and prop.name = 'MS_Description'
```


-- 
Reply to this email directly or view it on GitHub:
https://github.com/dbsrgits/dbix-class-schema-loader/issues/46
You are receiving this because you are subscribed to this thread.

Message ID: <dbsrgits/dbix-class-schema-loader/issues/46 at github.com>
----==_mimepart_637a934282215_3027c67021618e
Content-Type: text/html;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

<p></p>
<p dir="auto">Migrated from <a href="https://rt.cpan.org/Ticket/Display.html?id=53855" rel="nofollow">rt.cpan.org#53855</a> (status was 'open')</p>
<p dir="auto">Requestors:</p>
<ul dir="auto">
<li><a href="mailto:rmb32 at cornell.edu">rmb32 at cornell.edu</a></li>
</ul>
<p dir="auto">From <a href="mailto:rmb32 at cornell.edu">rmb32 at cornell.edu</a> on 2010-01-20 19:50:17<br>
:</p>
<pre class="notranslate"><code class="notranslate">Need implementations of _table_comment and _column_comment for more
backends (oracle, db2, mssql...)

With extra tests covering them of course.

</code></pre>
<p dir="auto">From <a href="mailto:justin.d.hunter at gmail.com">justin.d.hunter at gmail.com</a> on 2010-10-30 04:22:24<br>
:</p>
<pre class="notranslate"><code class="notranslate">Oracle support added: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?
p=dbsrgits/DBIx-Class-Schema-
Loader.git;a=commitdiff;h=4cd5155bb0df2e2e59378d9e878af90285967e12

On Wed Jan 20 14:50:17 2010, rbuels wrote:
&gt; Need implementations of _table_comment and _column_comment for more
&gt; backends (oracle, db2, mssql...)
&gt; 
&gt; With extra tests covering them of course.
&gt; 


</code></pre>
<p dir="auto">From <a href="mailto:rkitover at cpan.org">rkitover at cpan.org</a> on 2012-09-09 16:26:32<br>
:</p>
<pre class="notranslate"><code class="notranslate">An update on this ticket:

SineSwiper added support for the REMARKS field from $dbh-&gt;table_info and $dbh-
&gt;column_info in _table_comment and _column_comment in ::DBI.

Someone else (I forget who) added better support for MySQL, even though MySQL's 
support for comments is very lacking.

There is also a generic mechanism available to store your comments in tables, a 
table_comments and column_comments tables (overridable via table_comments_table 
and column_comments_table attributes.)

What is left is to investigate and test comment support for other supported DBs.
</code></pre>
<p dir="auto">From <a href="mailto:daxim at cpan.org">daxim at cpan.org</a> on 2017-06-22 14:44:47<br>
:</p>
<pre class="notranslate"><code class="notranslate">for MSSQL:

select t.name [Table], prop.value [TableComment]
from sys.tables t left join sys.extended_properties prop
on t.object_id = prop.major_id and prop.minor_id = 0 and prop.name = 'MS_Description'

select t.name [Table], c.name [Column], prop.value [ColumnComment]
from sys.tables t
inner join sys.columns c on t.object_id = c.object_id
left join sys.extended_properties prop
on t.object_id = prop.major_id and c.column_id = prop.minor_id and prop.name = 'MS_Description'
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />Reply to this email directly, <a href="https://github.com/dbsrgits/dbix-class-schema-loader/issues/46">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AACJ4ATRSL23NOBGHGGSWMLWJKFMFANCNFSM6AAAAAASGAV2E4">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AACJ4AWUZQ7BMOTJ4QV6L6DWJKFMFA5CNFSM6AAAAAASGAV2E6WGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHFNWFRYE.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span>&lt;dbsrgits/dbix-class-schema-loader/issues/46</span><span>@</span><span>github</span><span>.</span><span>com&gt;</span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/dbsrgits/dbix-class-schema-loader/issues/46",
"url": "https://github.com/dbsrgits/dbix-class-schema-loader/issues/46",
"name": "View Issue"
},
"description": "View this Issue on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>
----==_mimepart_637a934282215_3027c67021618e--



More information about the DBIx-Class-Devel mailing list