📄 ctype_cp1251.result
字号:
drop table if exists t1;SET NAMES cp1251;create table t1 (a varchar(10) not null) character set cp1251;insert into t1 values ("a"),("ab"),("abc");select * from t1;aaababcselect a, left(a,1) as b from t1;a ba aab aabc aselect a, left(a,1) as b from t1 group by a;a ba aab aabc aSELECT DISTINCT RIGHT(a,1) from t1;RIGHT(a,1)abcdrop table t1;create table t1 (a char(3) binary, b binary(3)) character set cp1251;insert into t1 values ('aaa','bbb'),('AAA','BBB');select upper(a),upper(b) from t1;upper(a) upper(b)AAA bbbAAA BBBselect lower(a),lower(b) from t1;lower(a) lower(b)aaa bbbaaa BBBselect * from t1 where upper(a)='AAA';a baaa bbbAAA BBBselect * from t1 where lower(a)='aaa';a baaa bbbAAA BBBselect * from t1 where upper(b)='BBB';a bAAA BBBselect * from t1 where lower(b)='bbb';a baaa bbbselect charset(a), charset(b), charset(binary 'ccc') from t1 limit 1;charset(a) charset(b) charset(binary 'ccc')cp1251 binary binaryselect collation(a), collation(b), collation(binary 'ccc') from t1 limit 1;collation(a) collation(b) collation(binary 'ccc')cp1251_bin binary binarydrop table t1;create table t1 (a varchar(16) character set cp1251 collate cp1251_bin not null,b int(10) default null,primary key(a)) charset=cp1251;insert into t1 (a) values ('air'),('we'),('g'),('we_toshko'), ('s0urce'),('we_ivo'),('we_iliyan'),('we_martin'),('vw_grado'),('vw_vasko'),('tn_vili'),('tn_kalina'),('tn_fakira'),('vw_silvia'),('vw_starshi'),('vw_geo'),('vw_b0x1');select * from t1 where a like 'we_%';a bwe_iliyan NULLwe_ivo NULLwe_martin NULLwe_toshko NULLdrop table t1;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -