5
votes
1answer
124 views

Find out which columns must be specified in insert-statement

Sometimes when inserting data in a table with many columns it could be useful to know which columns must be specified if the insert-statement shouldn't fail. I wrote this query to find out which ...
9
votes
2answers
1k views

Why can't I use NEWSEQUENTIALID() as the default value for my column?

I'm trying to create a table in Management Studio and after reading about the new (from SQL 2005 on) NEWSEQUENTIALID() function, thought I'd give it a go. This is what I'm doing: But it's not ...
4
votes
1answer
484 views

An alternative for sp_unbinddefault

I have a column with default value bound to UW_ZeroDefault and I am trying get rid of it. As I understand it, this default has been created by using CREATE DEFAULT then the column has been bound to ...
6
votes
1answer
3k views

Add DEFAULT to existing column

In Microsoft SQL server, how can I add/change the default on an existing table column using T-SQL?