Skip to content

Tarik Billa

  • Web Development
    • html
    • vue.js
    • laravel
    • css
    • javascript
    • jquery
    • node.js
    • php
    • asp.net
  • Programming
    • python
    • java
    • c
    • c++
    • c#
  • git
  • android

sql-null

MySQL NULL or NOT NULL That is The Question?

May 20, 2023 by Tarik

NULL means you do not have to provide a value for the field… NOT NULL means you must provide a value for the fields. For example, if you are building a table of registered users for a system, you might want to make sure the user-id is always populated with a value (i.e. NOT NULL), … Read more

Categories mysql Tags database, mysql, sql-null Leave a comment

MySQL, better to insert NULL or empty string?

October 8, 2022 by Tarik

By using NULL you can distinguish between “put no data” and “put empty data”. Some more differences: A LENGTH of NULL is NULL, a LENGTH of an empty string is 0. NULLs are sorted before the empty strings. COUNT(message) will count empty strings but not NULLs You can search for an empty string using a … Read more

Categories mysql Tags mysql, sql, sql-null Leave a comment

Tarik Billa

Software Engineer
tarikbilla@gmail.com
+8801884414000
  • Reuse a hash in YAMLApril 17, 2024
  • Dockerfile: how to redirect the output of a RUN command to a variable?April 16, 2024
  • How to cd to a directory with spaces in the directory name?April 16, 2024
  • Maximum MIME type length when storing the type in a databaseApril 16, 2024
  • What is the difference between Unit, Integration, Regression and Acceptance Testing?April 16, 2024
© 2026 Tarik Billa