SQL.GetFieldIsNull
------------------

Whether the field value is NULL.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [SQL](component_SQL.md) | [2.6](newinversion26.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "SQL.GetFieldIsNull"; Command; Field ) 

**MBS**( **"SQL.GetFieldIsNull";** /\* Whether the field value is NULL. \*/  
**$Command**; /\* The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). \*/   
**$Field**) /\* The name or one based index of the field. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Command | The command reference number gained with [SQL.NewCommand](SQLNewCommand.md). | $Command |
| Field | The name or one based index of the field. | $Field |

### Result

Returns 1 if the value of current object is NULL; otherwise 0.

### Description

Whether the field value is NULL.  
### Examples

Read null value as empty, otherwise get floating number:

 If(  
 MBS ("SQL.GetFieldIsNull"; $command ; "FieldName");   
 "";  
 MBS ("[SQL.GetFieldAsFloat](SQLGetFieldAsFloat.md)"; $command ; "FieldName"))  
### See also

- [SQL.GetFieldAsBoolean](SQLGetFieldAsBoolean.md)
- [SQL.GetFieldAsDate](SQLGetFieldAsDate.md)
- [SQL.GetFieldAsDateTime](SQLGetFieldAsDateTime.md)
- [SQL.GetFieldAsNumber](SQLGetFieldAsNumber.md)
- [SQL.GetFieldAsPDF](SQLGetFieldAsPDF.md)
- [SQL.GetFieldAsPNG](SQLGetFieldAsPNG.md)
- [SQL.GetFieldAsText](SQLGetFieldAsText.md)
- [SQL.GetFieldAsTime](SQLGetFieldAsTime.md)
- [SQL.GetFieldValue](SQLGetFieldValue.md)
- [SQL.GetParamIsNull](SQLGetParamIsNull.md)

This function is free to use.

Created 18th August 2014 , last changed 25th February 2021

  
[SQL.GetFieldDataType](SQLGetFieldDataType.md) - [SQL.GetFieldName](SQLGetFieldName.md)

[HTML Version](SQLGetFieldIsNull.shtml)