13.使用CREATE DATABASE创建新数据库时指定字符编码ENCODING参数,请问需要指定哪个模板?
A.template0
B.template1
C.template0和template1均可以
D.template0和template1均不可以
答案:A
解析:
参见: CREATE DATABASE 语法,部分:The encoding and locale settings must match those of the template database, except when template0 is used as template. This is because other databases might contain data that does not match the specified encoding, or might contain indexes whose sort ordering is affected by LC_COLLATE and LC_CTYPE. Copying such data would result in a database that is corrupt according to the new settings. template0, however, is known to not contain any data or indexes that would be affected.
大体意思就是template0 ,是一个全新的,没有数据的模板,编码不存在冲突,如果是其他模板,有数据,可能编码有冲突。所以,选择 A。
|