Question: I have a navigation app with 5 pages. I also have a usercontrol with 3 radio buttons. This usercontrol is used by all 5 pages in my app. By default the first radio button is selected. However if the user clicks the 3rd radio button and I go to another page I want my usercontrol to still show that 3rd radio button as selected. How do I go about accomplishing this task?

Answer: 
Yes - **`INFORMATION_SCHEMA.TABLES`** should be what you're looking for.

It will give you something like:

```
aspnetdb    dbo    aspnet_Paths                      BASE TABLE
aspnetdb    dbo    aspnet_PersonalizationAllUsers    BASE TABLE
aspnetdb    dbo    aspnet_PersonalizationPerUser     BASE TABLE
aspnetdb    dbo    vw_aspnet_WebPartState_Paths      VIEW
aspnetdb    dbo    vw_aspnet_WebPartState_Shared     VIEW
aspnetdb    dbo    vw_aspnet_WebPartState_User       VIEW
aspnetdb    dbo    aspnet_Applications               BASE TABLE

```

If you want to know about the columns of a table, look at **`INFORMATION_SCHEMA.COLUMNS`**.

```
SELECT * 
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'aspnet_Users'

```

will give you all the details for the columns for the table specified.
Using INFORMATION\_SCHEMA for views and code will *fail*. The data is limited to nvarchar(4000), so longer stuff will not be read. Use [sys.sql\_modules](http://msdn.microsoft.com/en-us/library/ms175081.aspx) or [OBJECT\_DEFINITION](http://msdn.microsoft.com/en-us/library/ms176090.aspx).

For tables, it's more difficult. A "table" consists of columns, constraints, indexes, possibly rules, UDTs (did I forget anything?). This is why SSMS has so many table scripting options compared to a view or stored proc.

I'd suggest profiling SSMS and hope it doesn't use SMO... or use SMO via CLR code or even xp\_cmdshell.