| Précédent | Table des matière | Suivant |
![]() | ![]() |
Un problème commun est la création d'une table avec des noms de colonne qui sont aussi des nom de type de données, ou de fonction natives MySQL. Ceci est parfaitement possible (par exemple, ABS peut être un nom de colonne), mais aucun espace n'est autorisé entre le nom d'une fonction est la parenthèse ouvrante lorsque ces noms sont utilisé comme des fonctions .
Les mots suivants sont explicitement reservés par MySQL. La plus part sont interdits pas ANSI SQL92 comme nom de colonne ou nom de table (par exemple, group). Quelques uns sont reservés par MySQL qui en a besoin pour utiliser un analyseur syntaxique yacc
Les noms suivants (issus de la table ci-dessus) sont interdits pas ANSI SQL, mais acceptés apr MySQL comme nom de table/colonne. Ceci, car ces noms sont très courants, et de nombreuses personnes les utilisent déjà :
action @tab add @tab all @tab alter
after @tab and @tab as @tab asc
auto_increment @tab between @tab bigint @tab bit
binary @tab blob @tab bool @tab both
by @tab cascade @tab char @tab character
change @tab check @tab column @tab columns
constraint @tab create @tab cross @tab current_date
current_time @tab current_timestamp @tab data @tab database
databases @tab date @tab datetime @tab day
day_hour @tab day_minute @tab day_second @tab dayofmonth
dayofweek @tab dayofyear @tab dec @tab decimal
default @tab delete @tab desc @tab describe
distinct @tab distinctrow @tab double @tab drop
escaped @tab enclosed @tab enum @tab explain
exists @tab fields @tab first @tab float
float4 @tab float8 @tab foreign @tab from
for @tab full @tab function @tab grant
group @tab having @tab hour @tab hour_minute
hour_second @tab ignore @tab in @tab index
infile @tab insert @tab int @tab integer
interval @tab int1 @tab int2 @tab int3
int4 @tab int8 @tab into @tab if
is @tab join @tab key @tab keys
last_insert_id @tab leading @tab left @tab like
lines @tab limit @tab load @tab lock
long @tab longblob @tab longtext @tab low_priority
match @tab mediumblob @tab mediumtext @tab mediumint
middleint @tab minute @tab minute_second @tab month
monthname @tab natural @tab numeric @tab no
not @tab null @tab on @tab option
optionally @tab or @tab order @tab outer
outfile @tab partial @tab password @tab precision
primary @tab procedure @tab processlist @tab privileges
quarter @tab read @tab real @tab references
rename @tab regexp @tab reverse @tab repeat
replace @tab restrict @tab returns @tab rlike
second @tab select @tab set @tab show
smallint @tab soname @tab sql_big_tables @tab sql_big_selects
sql_select_limit @tab sql_low_priority_updates @tab sql_log_off @tab sql_log_update
straight_join @tab starting @tab status @tab string
table @tab tables @tab terminated @tab text
time @tab timestamp @tab tinyblob @tab tinytext
tinyint @tab trailing @tab to @tab use
using @tab unique @tab unlock @tab unsigned
update @tab usage @tab values @tab varchar
variables @tab varying @tab varbinary @tab with
write @tab where @tab year @tab year_month
zerofill
Les valeurs suivantes issues de la table ci dessus) sont interdites par ANSI SQL, mais autorisées par MySQL comme nom de table ou de colonne. Ceci, car ce sont des noms naturels, et de nombreuses personnes les utilisent déjà.
ACTION
BIT
DATE
ENUM
NO
TEXT
TIME
TIMESTAMP
![]() | Table des matières | ![]() |
| Précédent | ![]() | Suivant |