VARCHAR
VARCHAR
The VARCHAR function returns a varying-length character string representation of a character string.
Syntax
Character to Varchar
VARCHAR (CharacterStringExpression )
- CharacterStringExpression
- An expression whose value must be of a character-string data type with a maximum length of 32,672 bytes.
Datetime to Varchar
VARCHAR (DatetimeExpression )
- DatetimeExpression
- An expression whose value must be of a date, time, or timestamp data type.
Example
Using the EMPLOYEE table, select the job description (JOB defined as CHAR(8)) for Dolores Quintana as a VARCHAR equivelant:
SELECT VARCHAR(JOB) FROM EMPLOYEE WHERE LASTNAME = 'QUINTANA'
Previous Page
Next Page
Table of Contents
Index