Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 294709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:23:30+00:00 2026-05-12T06:23:30+00:00

If this question is too broad, my apologies. I am a DBA and I

  • 0

If this question is too broad, my apologies. I am a DBA and I am working with a developer that thinks column defaults are a bad idea and that just setting the column to disallow nulls is good enough.

I am looking for the benefits of column defaults from the developers point of view. Thank you for your comments.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:23:30+00:00Added an answer on May 12, 2026 at 6:23 am

    Column defaults allow you to remove a lot of the hassle of creating records from your code or application logic.

    Advantage #1: If you have a table with 2 columns of user information and 20 columns of tinyint/boolean fields, let’s say they are privacy settings, and you go to create a new record in that table, without a DEFAULT value you’re going to have to specify every column in your query. There’s probably a common setup that you want these records to have by default, and you can set this up using DEFAULT values. When you INSERT a record, you only need to specify the two user information fields, and voila, your record is created with a nice set of common privacy settings. You can tweak the flags individually after that.

    Advantage #2: Forward compatibility! If you have a bunch of INSERTs in your code, and then some columns are added on, you’re going to have to go back and modify all those INSERTs if you don’t specify a DEFAULT value (assuming, as is common, that NULLs aren’t going to cut it). Often it isn’t necessary to update old code for a new column (since the old code by nature doesn’t care about the new column), so this would be a huge pain in the @$$ if you had to start going back and handling every new column in your code as it came along.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

[I hope that this question is not too broad, I think that the subject
I am afraid that this question might be a little too broad, but I
Alright, I hope this isn't too broad a question but my curiosity got the
I hope this question isn't too general. Well, the situation is that I am
I hope this question isn't too dumb. We have many websites internally that need
All, Apologies in advance - this question might be too open-ended for SO. Anyway...
First of all, let me apologize if this question is too broad. I'm looking
This may be too broad a question, but how is soundcloud actually programmed? To
I apologize upfront if this question is too broad. I come from the MATLAB
I apologize in advance if this question is too broad or too it-depends. Basically,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.