出库部分
This commit is contained in:
@@ -55,7 +55,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
FROM
|
||||
sys.columns c
|
||||
INNER JOIN
|
||||
sys.tables t ON c.object_id = t.object_id
|
||||
(SELECT object_id, name FROM sys.tables
|
||||
UNION ALL
|
||||
SELECT object_id, name FROM sys.views) t ON c.object_id = t.object_id
|
||||
LEFT JOIN
|
||||
sys.types ty ON c.user_type_id = ty.user_type_id
|
||||
LEFT JOIN (
|
||||
|
||||
@@ -77,7 +77,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableList" parameterType="GenTable" resultMap="GenTableResult">
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
|
||||
from (
|
||||
select name, object_id, create_date, modify_date from sys.tables
|
||||
union all
|
||||
select name, object_id, create_date, modify_date from sys.views
|
||||
) t
|
||||
LEFT JOIN
|
||||
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
|
||||
AND ep.name = 'MS_Description' -- 标准注释名称
|
||||
@@ -98,7 +103,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</select>
|
||||
|
||||
<select id="selectDbTableListByNames" resultMap="GenTableResult">
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time from sys.tables t
|
||||
select t.name as table_name, ISNULL(ep.value, '') AS table_comment, create_date as create_time, modify_date as update_time
|
||||
from (
|
||||
select name, object_id, create_date, modify_date from sys.tables
|
||||
union all
|
||||
select name, object_id, create_date, modify_date from sys.views
|
||||
) t
|
||||
LEFT JOIN
|
||||
sys.extended_properties ep ON ep.major_id = t.object_id AND ep.minor_id = 0 -- 表示是对整个表的注释(不是列)
|
||||
AND ep.name = 'MS_Description' -- 标准注释名称
|
||||
|
||||
Reference in New Issue
Block a user