January 2, 2012 at 12:41 am
i need all columns in parent table and primary key as well as a foreign key AND DATATYPE,LENGTN sql 2008
This is report for one Sechama
January 2, 2012 at 12:48 am
did you look at the scripting of SSMS ?
or
have a look that the information_schema views ...
select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_SCHEMA = 'Person'
order by TABLE_NAME, ORDINAL_POSITION ;
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
January 2, 2012 at 2:51 pm
rajugnt (1/2/2012)
i need all columns in parent table and primary key as well as a foreign key AND DATATYPE,LENGTN sql 2008
This is report for one Sechama
sp_help 'PutTableNameHere'
--Jeff Moden
Change is inevitable... Change for the better is not.
January 2, 2012 at 11:22 pm
For only the FK info you can use
sp_fkeys 'schema.childtable'
but that doesn't publish datatype nor length
Johan
Learn to play, play to learn !
Dont drive faster than your guardian angel can fly ...
but keeping both feet on the ground wont get you anywhere :w00t:
- How to post Performance Problems
- How to post data/code to get the best help[/url]
- How to prevent a sore throat after hours of presenting ppt
press F1 for solution, press shift+F1 for urgent solution 😀
Need a bit of Powershell? How about this
Who am I ? Sometimes this is me but most of the time this is me
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply