# list\_drop

{% hint style="info" %}
Sys Schema is available from MariaDB 10.6.
{% endhint %}

## Syntax

```
sys.list_drop(list,value)
```

## Description

`list_drop` is a [stored function](https://mariadb.com/docs/server/server-usage/stored-routines/stored-functions) available with the [Sys Schema](https://mariadb.com/docs/server/reference/system-tables/sys-schema).

It takes a *list* to be modified and a *value* to be dropped from the list, returning the resulting value. This can be used, for example, to remove a value from a system variable taking a comma-delimited list of options, such as [sql\_mode](https://mariadb.com/docs/server/server-management/variables-and-modes/sql_mode).

The related function [list\_add](https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/list_add) can be used to add a value to a list.

## Examples

```sql
SELECT @@sql_mode;
+-----------------------------------------------------------------------+
| @@sql_mode                                                            |
+-----------------------------------------------------------------------+
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,
NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION |
+-----------------------------------------------------------------------+

SET @@sql_mode = sys.list_drop(@@sql_mode, 'NO_ENGINE_SUBSTITUTION');

SELECT @@sql_mode;
+-----------------------------------------------------------------------+
| @@sql_mode                                                            |
+-----------------------------------------------------------------------+
| STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,
NO_AUTO_CREATE_USER |
+-----------------------------------------------------------------------+
```

## See Also

* [list\_add](https://mariadb.com/docs/server/reference/system-tables/sys-schema/sys-schema-stored-functions/list_add)

<sub>*This page is licensed: CC BY-SA / Gnu FDL*</sub>

{% @marketo/form formId="4316" %}
