Wednesday, March 21, 2012 11:59 AM
Is it possible to query a database diagram to count how many table it contains? So I only want to know how many tables thats in a certain diagram?
select * from dbo.sysdiagrams as s where s.name = 'dbo_diagram'
But with that im only getting diagramid, version etc..
Or something like this
EXEC sp_MSforeachtable 'USE [?]; SELECT ''?'' COUNT(*) FROM dbo.sysdiagrams as s where s.name = ''dbo_diagram'Is it possible to query a diagram like this?
- Edited by labrinths Wednesday, March 21, 2012 11:59 AM
Wednesday, March 21, 2012 12:28 PM
The diagram is stored binary encoded in sysdiagrams, you can't query it directly.
Tuesday, March 27, 2012 11:15 AM