Parse Database Columns from SQL 2008

Vote Up
Vote Down

Open in the Regex Tester

You can use this by right-clicking a table in SQL 2008 Management Studio, select "Design", and then select & copy the full list of columns and data types. This regular expression will then parse this list, storing text in the ColumnName, DataType, and Length named groups. It's a time saver when you're dealing with a large list of columns and need to write code based off of those column names. Included is an example which creates a parameter list in C#.
Steve Wortham
1/11/2010 11:39:19 PM

0 comments so far.
Log in to leave a comment.

<< back to Library