Nothing simple out of the box in direct T-SQL, which exactly repeats what SSMS does.
However, you can get to this through metadata ( INFORMATION_SCHEMA.COLUMNS , etc.), and I did it quite successfully. Note that indexes are not in INFORMATION_SCHEMA - they are in sys.indexes.
Check out this article , which probably has most of what you want.
source share