-- en sql 2000
select name, Id from sysobjects
where type='U' and name <> 'dtproperties'
order by name
-- en sql 2005
with ctabla
as
(select s.name + '.' + t.name tabla, t.object_id oid from sys.tables t
inner join sys.schemas s on t.schema_id = s.schema_id)
select t.tabla, name from sys.columns c
inner join ctabla t on c.object_id = t.oid
Hugo Román Bernachea
Mail de contacto: SQLServer777@gmail.com
Microsoft Certified DBA
Microsoft Certified Trainer
Twitter: @bernachea
0 comentarios:
Publicar un comentario