File: show_functions.sql

package info (click to toggle)
sqlfluff 3.5.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,000 kB
  • sloc: python: 106,131; sql: 34,188; makefile: 52; sh: 8
file content (54 lines) | stat: -rw-r--r-- 1,676 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- Unfiltered list of all functions;
SHOW FUNCTIONS;

-- List a system function `trim` by searching both user defined and system
-- defined functions.
SHOW FUNCTIONS trim;

SHOW ALL FUNCTIONS trim;

-- List a system function `concat` by searching system defined functions.
SHOW SYSTEM FUNCTIONS concat;

-- List a user function `concat_user` by searching user defined functions.
SHOW USER FUNCTIONS concat_user;

-- List a qualified function `max` from database `salesdb`.
SHOW SYSTEM FUNCTIONS salesdb.max;

-- List all functions starting with `t`
SHOW FUNCTIONS LIKE 't*';

-- List all functions starting with `t` without LIKE keyword
SHOW FUNCTIONS 't*';

-- List all user functions starting with `t`
SHOW USER FUNCTIONS LIKE 't*';

-- List all user functions starting with `t` without LIKE keyword
SHOW USER FUNCTIONS 't*';

-- List all functions starting with `yea` or `windo`
SHOW FUNCTIONS LIKE 'yea*|windo*';

-- Use normal regex pattern to list function names that has 4 characters
-- with `t` as the starting character.
SHOW FUNCTIONS LIKE 't[a-z][a-z][a-z]';

-- List all functions from default schema
SHOW FUNCTIONS FROM default;

-- List all user functions from default schema
SHOW USER FUNCTIONS FROM default;

-- List all functions from default schema starting with `t`
SHOW FUNCTIONS FROM default LIKE 't*';

-- List all functions from default schema starting with `t` without LIKE keyword
SHOW FUNCTIONS FROM default 't*';

-- List all user functions from default schema starting with `t`
SHOW USER FUNCTIONS FROM default LIKE 't*';

-- List all user functions from default schema starting with `t` without LIKE keyword
SHOW USER FUNCTIONS FROM default 't*';