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

  • SEARCH
  • Home
  • 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 8194851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T04:57:15+00:00 2026-06-07T04:57:15+00:00

Just a general question. Is it better for database keep values or NULLs? I

  • 0

Just a general question. Is it better for database keep values or NULLs?

I have a commission field which calculates every day and is based on total amount value condition. Next date commission calculates on previous one and sums with total value. A commission can be 0.00 as well but not negative. Is it better to keep zero values or fill them as NULLs and use ‘ISNULL(comm, 0)’ in queries rather just ‘comm’?

Which is better for performance and DB capacity?

UPD: Performance is just good. I wonder if there any storage capacity difference when you have hundreds of users records for each day? Is NULL as EMPTY really that EMPTY or it takes some bytes when the storage value of 0.00 is less than NULL itself.

  • 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-06-07T04:57:16+00:00Added an answer on June 7, 2026 at 4:57 am

    If the commission value is 0, you should keep it as 0 ,Not NULL. Why do you want to call the ISNULL function to convert it back to 0 again ? that is wrong and it makes the future programmer who is going to handle your code , sit and think 2 days why it was designed so.

    Keep it simple and clean. Use 0.

    from msdn,

    A value of NULL indicates that the value is unknown. A value of NULL
    is different from an empty or zero value.

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

Sidebar

Related Questions

This is just a general question. Which is better, traditional ajax or the jquery
just a general question, do you ALWAYS have to handle error? i was just
I just wanted to get the general consensus on which is a better mode
This is more of a general question about which direction would be a better
I have a question that doesn't need any specific answer, just a general direction
Just a general question regarding the difference between extending a class and implementing it.
Just a general curiosity question. Why is this namespace System.Collections.Generic added by default in
just had a general question about how to approach a certain problem I'm facing.
I just started using php arrays (and php in general) I have a code
i have a quite weird question which probably has no practical use but the

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.