March 2000
Beginner
464 pages
9h 17m
English
Most functions can be combined in a single SQL statement. SQL would be far too limited if function combinations were not allowed. The following examples show how some functions can be combined with one another in a query:
SELECT LAST_NAME || ', ' || FIRST_NAME NAME, SUBSTR(EMP_ID,1,3) || '-' || SUBSTR(EMP_ID,4,2) || '-' || SUBSTR(EMP_ID,6,4) ID FROM EMPLOYEE_TBL;
NAME ID ------------------ ----------- STEPHENS, TINA 311-54-9902 PLEW, LINDA 442-34-6889 GLASS, BRANDON 213-76-4555 GLASS, JACOB 313-78-2439 WALLACE, MARIAH 220-98-4332 SPURGEON, TIFFANY 443-67-9012 6 rows selected.
The following example combines two functions in the query (concatenation with substring). By pulling the EMP_ID column ...
Read now
Unlock full access