第240章前往星门宗 (18 / 20) 首页

字体:大 中 小     护眼 关灯

上一章 目录 下一章

第240章前往星门宗 (18 / 20)
         ' when obj.type = 'SN' then ' + CAST(@synonym AS nvarchar(8)) +

         ' else ' + CAST(@unknown AS nvarchar(8)) +

         ' end

         from ' + quotename(@dbname) + '.sys.objects as obj

         join ' + quotename(@dbname) + '.sys.schemas as sch on sch.schema_id = obj.schema_id

         where obj.name = #t2.object_name collate database_default

         and sch.name = #t2.relative_schema collate database_default

         and #t2.object_type = ' + CAST(@obj AS nvarchar(8)) + ' and #t2.object_schema IS NULL

         and (#t2.object_db IS NULL or #t2.object_db = '' + @dbname + '')

         and #t2.rank = (' + CAST(@iter_no AS nvarchar(8)) + '+1) and #t2.object_id IS NULL and #t2.object_svr IS NULL'

         EXEC (@query)

         -- @type

         SET @query = 'update #t2 set object_db = N' + quotename(@dbname, '') + ', object_id = t.user_type_id, object_schema = SCHEMA_NAME(t.schema_id), object_type = case when t.is_assembly_type = 1 then ' + CAST(@udt AS nvarchar(8)) + ' when t.is_table_type = 1 then ' + CAST(@udtt AS nvarchar(8)) + ' else ' + CAST(@uddt AS nvarchar(8)) + ' end

  The content is not finished, continue reading on the next page

更多完整内容阅读登陆

《墨缘文学网,https://wap.mywenxue.org》
加入书签我的书架


上一章 目录 下一章