Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQLServerCentral.com
»
Articles Requested
»
Add a default to a column
Add a default to a column
Rate Topic
Display Mode
Topic Options
Author
Message
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Thursday, March 17, 2011 10:15 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
Show in SSMS and T-SQL, how to add a default to a column at design time (CREATE) and later (ALTER).
Be nice to add these defaults
space for char field
0 for numeric
current date for date field
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1079835
Dwayne Dibley
Dwayne Dibley
Posted Thursday, March 17, 2011 10:29 AM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:41 AM
Points: 365,
Visits: 2,900
Hi Steve
I'll take this.
Regards
Post #1079846
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Thursday, March 17, 2011 10:50 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
Excellent, this should be an easy one.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1079861
Dwayne Dibley
Dwayne Dibley
Posted Friday, July 29, 2011 9:08 AM
Old Hand
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:41 AM
Points: 365,
Visits: 2,900
Hi Steve
I'm going to have to pass on this. Workload means I don't currently have time to write an article that adds any value compared to what is already out there. Sorry. I've submitted a QOTD instead as penance.
Anybody else able to do this?
Post #1151019
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Friday, July 29, 2011 9:23 AM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
No worries, we'll find someone else.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1151030
Jeff Moden
Jeff Moden
Posted Tuesday, November 29, 2011 7:01 PM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 4:51 PM
Points: 32,923,
Visits: 26,811
Since this is very well documented in Books Online, I have to ask, do you still want an article on this and, if so, should it be more of a "Spackle" article?
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1213635
Steve Jones - SSC Editor
Steve Jones - SSC Editor
Posted Tuesday, November 29, 2011 9:32 PM
SSC-Dedicated
Group: Administrators
Last Login: Yesterday @ 3:30 PM
Points: 31,436,
Visits: 13,751
Yes, and Yes. We want to expand and cover things that are in BOL in a different way. A practical use for this in a short article that someone has implemented in production would be nice.
Follow me on Twitter:
@way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
Post #1213658
Jeff Moden
Jeff Moden
Posted Wednesday, November 30, 2011 6:09 AM
SSC-Dedicated
Group: General Forum Members
Last Login: Yesterday @ 4:51 PM
Points: 32,923,
Visits: 26,811
Steve Jones - SSC Editor (11/29/2011)
Yes, and Yes. We want to expand and cover things that are in BOL in a different way. A practical use for this in a short article that someone has implemented in production would be nice.
Understood and can do. I'll take this one on. Thank you for the guidance.
I believe I still owe you one on getting BCP (and other methods) to produce column headers, as well. I'll see what I can do about that, as well.
--Jeff Moden
"
RBAR
is pronounced "ree-bar" and is a "Modenism" for "
R
ow-
B
y-
A
gonizing-
R
ow".
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column."
For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/
For better answers on performance questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/
Post #1213868
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.