EXPRTYPE function [Miscellaneous]

Returns a string that identifies the data type of an expression.

Syntax
EXPRTYPE( string-expression, integer-expression )
Parameters
  • string-expression   A SELECT statement. The expression whose data type is to be queried must appear in the select list. If the string is not a valid SELECT statement, NULL is returned.

  • integer-expression   The position in the select list of the desired expression. The first item in the select list is numbered 1. If the integer-expression value does not correspond to a SELECT list item, NULL is returned.

See also
Standards and compatibility
  • SQL/2003   Vendor extension.

Example

The following statement returns smallint when executed against the SQL Anywhere sample database.

SELECT EXPRTYPE( 'SELECT LineID FROM SalesOrderItems', 1 );