Get the App
SLTechnology News&Howtos  ›  Database  › 

Mysql's method to check whether the field is empty

Shulou Source: shulou.com Published: 2022-06-01 02:43:45 09月12日 Update

Editor to share with you mysql to check whether the field is empty, I hope you have learned a lot after reading this article, let's discuss it together!

Mysql's method to check whether the field is empty: 1. The query is not empty and the code is [Select * From table_name Where idled empty fields']; 2, the query is empty and the code is [Select * From table_name WhereISNULL (I)].

Mysql's method to check whether the field is empty:

Different databases in the sql standard use different functions. Today, we found that the query ranking function in mysql does not support top in MySQL. This top function is a function of sql server.

Briefly talk about the null and non-empty query methods in MySQL. Null divided into empty string''; and null

1. Not empty

Select * From table_name Where id''Select * From table_name Where idlers

2. Empty

Select * From table_name Where id=''Select * From table_name Where ISNULL (id)

Specific analysis, if the field is char and Varchar type can use id=''; if the int type is better with ISNULL.

After reading this article, I believe you have a certain understanding of the method of mysql to check whether the field is empty. You want to know more about it. Welcome to follow the industry information channel. Thank you for your reading!

Tags: Fields methods functions queries differences codes articles characters strings done situation data databases more standards knowledge industry information information channels channels Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Microsoft Shulou Tech Info macOS MariaDB Huawei