This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
|
dev:sql:functions:contains:examples [2011/01/23 23:42] els created |
dev:sql:functions:contains:examples [2012/10/26 15:00] (current) |
||
|---|---|---|---|
| Line 12: | Line 12: | ||
| ==== Examples ==== | ==== Examples ==== | ||
| - | === Example 1: Column === | ||
| - | <code> | ||
| - | > select name, character_length(name) len from individuals; | ||
| - | NAME LEN | ||
| - | -------------------------------------------------- ----------- | ||
| - | MS. MARY LEWIS 14 | ||
| - | MRS. ALICE R TOLLIVER 21 | ||
| - | MR. SIDNEY K TOLLIVER 21 | ||
| - | MRS. JENNIFER J HOPKINS 23 | ||
| - | MR. CHARLIE HOPKINS 19 | ||
| - | MS. KIMBERLY BLUE 17 | ||
| - | KATHLEEN TUCKER 15 | ||
| - | |||
| - | </code> | ||
| - | |||
| - | === Example 2: Character Expression === | ||
| - | <code> | ||
| - | > select gender, name, char_length(gender || name) len from individuals; | ||
| - | |||
| - | G NAME LEN | ||
| - | - -------------------------------------------------- ----------- | ||
| - | F MS. MARY LEWIS 15 | ||
| - | F MRS. ALICE R TOLLIVER 22 | ||
| - | M MR. SIDNEY K TOLLIVER 22 | ||
| - | F MRS. JENNIFER J HOPKINS 24 | ||
| - | M MR. CHARLIE HOPKINS 20 | ||
| - | F MS. KIMBERLY BLUE 18 | ||
| - | F KATHLEEN TUCKER 16 | ||
| - | |||
| - | </code> | ||
| - | |||
| - | ==== ==== | ||
| - | |||
| - | **[[dev:sql:functions:contains:syntax|Next]]** | ||
| - | |||
| - | ====== Additional Resources ====== | ||
| - | |||
| - | See also: | ||
| - | {{page>dev:sql:functions:see_also_string&nofooter&noeditbtn&noheader}} | ||
| - | |||
| - | {{page>:bottom_add&nofooter&noeditbtn}} | ||