SQL: getting column information

To retrieve a list of column information for a table using T-SQL, use the following method:

SELECT
   ORDINAL_POSITION
  ,COLUMN_NAME
  ,DATA_TYPE
  ,CHARACTER_MAXIMUM_LENGTH
  ,IS_NULLABLE
  ,COLUMN_DEFAULT
FROM
  INFORMATION_SCHEMA.COLUMNS
WHERE
  TABLE_NAME = '<your table>'
ORDER BY
  ORDINAL_POSITION ASC; 
 
 

thanks to the original poster.

SQL: installing SQL server on Windows 7 Dutch

When you install SQL server 2008 R2 on Windows 7 Dutch, it is possible you will receive the following error during the “setup support rules” phase: Performance counter registry hive consistency

Setup Support Rules

The solution was found here: http://bertvanvreumingen.blogspot.com/2010/11/performance-counter-registry-hive.html

In short:

  • export the registry key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\009
  • Edit the registry file you just created and change the value 009 to 013, resulting in:
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Perflib\013
  • Merge the registry file and re-run the “setup support rules”