Take MS Sql table, Store procedure details
Some times you may need to take a description of a MS Sql data table in the hosted server.
If you are using a local host then no need to worry about it you can simply go to
the MS Sql server management studio and browse what evet database object you need.
But some time you may you face a trouble to check a data table or store procedure
architecture of a hosted server.
This articles gives some valueable MS sql queries to take those details.
01. Below query shows how to take table details
select column_name,column_type,is_nullable,column_key,column_default,extra from information_schema.columns
where table_schema='' and table_name=''
02. Next one shows how to get store procedure summary details
SELECT * FROM sysobjects WHERE type = 'P' AND category = 0 ORDER BY name
03. This one shows how to get a perticular body of a store procedure
SELECT text
FROM syscomments
WHERE id = (SELECT id FROM sysobjects WHERE name = 'YourStoreProcedureName')
ORDER BY colid
Comments
Post a Comment