This query lists every table column that has a default value defined, along with the default itself.
(optional so.name='xxx' to filter to a specific table)
SELECT so.name AS table_name, sc.name AS column_name, sm.text AS default_value
FROM sys.sysobjects so JOIN sys.syscolumns sc ON sc.id = so.id
LEFT JOIN sys.syscomments sm ON sm.id = sc.cdefault
WHERE so.xtype = 'U'AND sm.text IS NOT NULL --AND so.name = @yourtable
ORDER BY so.[name], sc.colid
These queries are provided as a guide, and are by no means perfect. I didn't write all of these - many are collated from MSDN documentation and community sources over the years.
| Skype Web SDK: Getting Started |
| Skype Web SDK: Audio & Video |
| What is Kutamo? |
| Kilimanjaro Climb |
| Kilimanjaro 2015 |
| Kilimanjaro 2013 |
| Australian Postcodes |
| New Zealand Postcodes |
| Worldwide City Database |
| Kilimanjaro Climbs |
| Kutamo Studios |
| Kutamo Meetings |
| Litzi |
| ErrLog.IO |
| Kutamo |