3.2 Simple Functions

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/6

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

7 Terms

1
New cards

function / argument

operates on an expression enclosed in parentheses, called an argument, and returns a value. Usually, the argument is a simple expression, such as a column name or fixed value. Some functions have several arguments, separated by commas, and a few have no arguments at all.

2
New cards

ABS()

Returns the absolute value.

3
New cards

LOWER()

returns lowercase

4
New cards

TRIM()

removes leading and trialing whitespace

SELECT TRIM(‘ HELLO ‘); — RETURNS ‘HELLO’

5
New cards

LTRIM()

Removes leading spaces from a string

6
New cards

RTRIM()

Removes trailing spaces from a string

7
New cards

HOUR(), MINUTE(), SECOND()

returns hour or minute or second from timestamp

SELECT HOUR(‘22:11:45’); — returns 22