Generating XML Schema of SQL Server 2005 Database
Database
1
Posts
1
Posters
0
Views
1
Watching
-
hi everyone, I've been trying to make the XML Schema of my SQL Server Database and currently I've found this to generate an XSD schema,
create table Person
(
Age int not NULL check( Age > 0) ,
Height numeric(10,2) not NULL check( Height > 5),
Gender varchar(5) not null check( Gender in (’M', ‘F’, ‘O’)),
BirthDate datetime null,
)
DECLARE @schema xml
SET @schema = (SELECT * FROM Person FOR XML AUTO, ELEMENTS, XMLSCHEMA(’PersonSchema’))
select @schema
OUTPUT:But the problem is that this is generating the schema of only one table where as I want to generate the schema of the whole Database, Can u suggest some quick solution for that? Thanks in advance
Rocky Success is a ladder which you can't climb with your hands in your pockets.