Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
drh3010
Starting Member
18 Posts |
Posted - 2007-12-17 : 15:44:45
|
| Anyone know how to get the default value for a field? Apparently ODBC can't do it, so I need to resort to a raw SQL statement. |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2007-12-17 : 15:48:49
|
| select column_defaultfrom information_schema.columnswhere table_name = 'sometable' and column_name = 'somecolumn'Tara KizerMicrosoft MVP for Windows Server System - SQL Serverhttp://weblogs.sqlteam.com/tarad/ |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-17 : 15:51:37
|
[code]select column_defaultfrom INFORMATION_SCHEMA.COLUMNSwhere TABLE_NAME = 'table1' and COLUMN_NAME = 'col1'[/code] E 12°55'05.25"N 56°04'39.16" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-12-17 : 15:52:18
|
 E 12°55'05.25"N 56°04'39.16" |
 |
|
|
|
|
|