w3resource

SQLite typeof() function

Description

The typeof() function returns a string that indicates the datatype of the expression. The only return values are: "null", "integer", "real", "text", or "blob".

Syntax:

typeof(X)

SQLite Version: 3.8.5

Arguments:

Example: SQLite typeof() function

The following SQLite statement returns the datatype from the given expressions.

SELECT typeof('w3resource.com');

Here is the result.

Sample Output:

typeof('w3resource.com')
------------------------
text
SELECT typeof(5347);

Here is the result.

Sample Output:

typeof(5347)
------------
integer
SELECT typeof(5347.2147);

Here is the result.

Sample Output:

typeof(5347.2147)
-----------------
real
SELECT typeof(NULL);

Here is the result.

Sample Output:

typeof(NULL)
------------
null
SELECT typeof('true and false');

Here is the result.

Sample Output:

typeof('true and false')
------------------------
text

Previous: trim()
Next: upper()



Become a Patron!

Follow us on Facebook and Twitter for latest update.

It will be nice if you may share this link in any developer community or anywhere else, from where other developers may find this content. Thanks.

https://www.w3resource.com/sqlite/core-functions-typeof.php