데이터베이스 시트 정보 조회
[color=darkblue]
SELECT code,name, tree_link,precode,cast(srt as varchar) orders, 1 AS [Level] FROM ( select t.ID code, T.NAME, T.MENUTYPE, T.URL tree_link, T.PARENTID precode, right(str(t.sort+100000),5) srt from sys_privilege t where t.id in (select gp.id id from SYS_GROUP_PRIVILEGE GP, SYS_USER_GROUP UG where ('100' is null or ug.userid = '100') and gp.groupid =ug.groupid ) and t.menutype = '0' ) aa WHERE code = '98' UNION ALL SELECT aa.code, aa.name,aa.tree_link,aa.precode,cast(cast(TreeCTE.orders as varchar)+' '+cast(aa.srt as varchar) as varchar) orders, [Level] + 1 FROM TreeCTE INNER JOIN ( select t.ID code, T.NAME, T.MENUTYPE, T.URL tree_link, T.PARENTID precode, right(str(t.sort+100000),5) srt from sys_privilege t where t.id in (select gp.id id from SYS_GROUP_PRIVILEGE GP, SYS_USER_GROUP UG where ('100' is null or ug.userid = '100') and gp.groupid =ug.groupid ) and t.menutype = '0' ) aa ON TreeCTE.code = aa.precode ) select code,name,'/isms'+tree_link tree_link,precode from TreeCTE order by orders
(1)
SELECT
=case when a.colorder=1 then d.name else '' end,
=case when a.colorder=1 then isnull(f.value,'') else '' end,
=a.colorder,
=a.name,
=case when COLUMNPROPERTY( a.id,a.name,'IsIdentity')=1 then '√'else '' end,
=case when exists(SELECT 1 FROM sysobjects where xtype='PK' and parent_obj=a.id and name in (
SELECT name FROM sysindexes WHERE indid in(
SELECT indid FROM sysindexkeys WHERE id = a.id AND colid=a.colid
))) then '√' else '' end,
=b.name,
=a.length,
=COLUMNPROPERTY(a.id,a.name,'PRECISION'),
=isnull(COLUMNPROPERTY(a.id,a.name,'Scale'),0),
=case when a.isnullable=1 then '√'else '' end,
=isnull(e.text,''),
=isnull(g.[value],'')
FROM syscolumns a
left join systypes b on a.xusertype=b.xusertype
inner join sysobjects d on a.id=d.id and d.xtype='U' and d.name<>'dtproperties'
left join syscomments e on a.cdefault=e.id
left join sysproperties g on a.id=g.id and a.colid=g.smallid
left join sysproperties f on d.id=f.id and f.smallid=0
--where d.name=' ' -- ,
order by a.id,a.colorder
(2)
SQL2000
--1:
select Name from sysobjects where xtype='u' and status>=0
--2:
select name from syscolumns where id=object_id(' ')
--3: 、 、
select a.* from sysobjects a, syscomments b where a.id = b.id and b.text like '% %'
--4:
select name as from sysobjects where xtype='P'
--5:
select * from master..sysdatabases D where sid not in(select sid from master..syslogins where name='sa')
select dbid, name AS DB_NAME from master..sysdatabases where sid <> 0x01
--6:
select column_name,data_type from information_schema.columns
where table_name = ' '
--7:
select name,
(select value from sysproperties where id = syscolumns.id and smallid=syscolumns.colid) as
from syscolumns where id=object_id(' ')
[/color]
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
정수 반전Udemy 에서 공부 한 것을 중얼거린다 Chapter3【Integer Reversal】 (예) 문자열로 숫자를 반전 (toString, split, reverse, join) 인수의 수치 (n)가 0보다 위 또는 ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.