S
S
Sergey Vanyushin2013-12-15 13:25:03
MySQL
Sergey Vanyushin, 2013-12-15 13:25:03

What does DEFAULT mean in CREATE DATABASE statement in mysql?

CREATE DATABASE `abc` DEFAULT CHARACTER SET = 'utf8';

The official documentation page dev.mysql.com/doc/refman/5.5/en/create-database.html generally shows what you can install, but you can not. Nothing changes. Is it so?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
darau, 2013-12-15
@wapmorgan

Default sets the default encoding, if not set here, it will be taken by default from my.conf

R
Rsa97, 2013-12-15
@Rsa97

So.

SHOW CREATE DATABASE `abc`;
+----------+--------------------------------------------------------------+
| Database | Create Database                                              |
+----------+--------------------------------------------------------------+
| abc      | CREATE DATABASE `abc` /*!40100 DEFAULT CHARACTER SET utf8 */ |
+----------+--------------------------------------------------------------+

That is, the word DEFAULT is added automatically if necessary. /*!40100 */ means that this code will be processed in mysql 4.01.00 and higher.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question