/
mysql_qualify.html
42 lines (37 loc) · 1.03 KB
/
mysql_qualify.html
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
<h3>NAME</h3>
mysql_qualify(): Return a qualified MySQL object name.
<h3>TYPE</h3>
Function
<h3>DESCRIPTION</h3>
<p>
A qualified MySQL object name is its name surrounded by backticks, e.g. <strong>`sakila`</strong>.
The function wraps the given text with backticks, if it is not already qualified as such.
It handles cases where a backtick is part of the object's name (though this is considered
poor practice).
</p>
<h3>SYNOPSIS</h3>
<p>
<blockquote><pre>mysql_qualify(name TINYTEXT CHARSET utf8)
RETURNS TINYTEXT CHARSET utf8</pre></blockquote>
</p>
<p>
Input:
<ul>
<li><strong>name</strong>: an object's name. An object is a schema, table, column,
index, foreign key, view, trigger, etc.
</li>
</ul>
</p>
<h3>EXAMPLES</h3>
<p>Qualify a simple name:</p>
<blockquote><pre>mysql> SELECT common_schema.mysql_qualify('film_actor') AS qualified;
+--------------+
| qualified |
+--------------+
| `film_actor` |
+--------------+
</pre></blockquote>
<h3>ENVIRONMENT</h3>
MySQL 5.1 or newer
<h3>AUTHOR</h3>
Shlomi Noach