Posted on: 9/29/2012 10:34:43 AM | Views : 277

I'm creating a tool and I want it to display Column information simular to Microsoft SQL Server managemt system.
I have a SQL database that contains a table called GroupProjects and this table contains three columns. I want to display the columns like this:
Desired results:
GroupProjectID(PK, int, not null)GroupID(FK, int, not null)ProjectID(FK, int, not null) I've been playing around with some T-SQL statements but I can't get it to display the data as I want it. Does anyone know how to do this?
As per Sean's request here is the SQL that somewhat works, but instead of giving me the three row desired result mentioned in the original post it gives me a nine row result. I think it has something to do with the INNER JOINS, but I don't know how to fix it.
USE [ProjectTimeTracker]; SELECT OBJECT_SCHEMA_NAME(T.[object_id],DB_ID()) AS [Schema], T.[name] AS [table_n ...

Go to the complete details ...