买了本书,同时网上找了电子版

(My)SQL入门

  • DDL(Data Definition Languages)

||DESCRIBE tablename;

  • DML(Data manipulation languages)

  • DCL(Data Control Languages)

帮助的使用

help;

? contents;
? data types;
? int;

? show;
? create table;

查询元数据信息

字段类型

函数

mysql 字符集相关

查看所有可用字符集

show character set;

查看所有字符集和字符集默认校对规则

select * from information_schema.character_sets;

查看字符集的校对规则

show collation like 'gbk%';

select * from information_schema.collations;

select case when 'A' collate gbk_chinese_ci = 'a' collate gbk_chinese_ci then 1 else 0 end;

mysql有4个级别的字符默认设置:服务器级别,数据库级别,表级,字段级

服务器级别

查看当前字符集和校验规则

show variables like 'character_set_server';

show variables like 'collation_server';

数据库级别

show variables like 'character_set_database';

show variables like 'collation_database';

//如果指定了校验规则未指定字符集,则字符集使用与校验规则匹配的字符集;

读《深入浅出Mysql》第二版,笔记的更多相关文章

  1. python核心编程第二版笔记

    python核心编程第二版笔记由网友提供:open168 python核心编程--笔记(很详细,建议收藏) 解释器options:1.1 –d   提供调试输出1.2 –O   生成优化的字节码(生成 ...

  2. C++标准库第二版笔记 3 和异常的理解 1

    C++标准库第二版笔记 3 和异常的理解 1 差错和异常(error and exception)的处理 标准异常类(exception class) 定义于 分为: 1.语言本身支持的异常 2.标准 ...

  3. C++标准库第二版笔记 2.1

    C++标准库第二版笔记 2.1 1 Range-Based for 循环 for ( decl : coll ) { statements; } // collaborate 类似C# foreach ...

  4. C++标准库第二版笔记 2

    C++标准库第二版笔记 2 微小但重要的语法提升 template表达式内的空格: vector< list<int> >; // OK in each C++ version ...

  5. C++标准库第二版笔记 1

    C++标准库第二版笔记 1 C++ std历史 第一份标准化文档: C++98 & C++03 & TR1 TR1 Information Technology- Programmin ...

  6. JavaPersistenceWithHibernate第二版笔记-第四章-Mapping persistent classes-002identity详解

    一.简介 1.You now have three methods for distinguishing references:  Objects are identical if they occ ...

  7. JavaPersistenceWithHibernate第二版笔记Getting started with ORM-001用JPA和Hibernate实现HellowWorld(JTA、Bitronix)

    一.结构 二.model层 1. package org.jpwh.model.helloworld; import javax.persistence.Entity; import javax.pe ...

  8. 精通JavaScipt第二版笔记——特性、函数和对象

    前言:感觉这本书只有第二章 第三章有点看头 基本类型和引用类型 基本类型:字符串 数字 布尔值 null(待确定) undifined 引用类型:对象 数组 引用传递 保存的只是对象的地址 var o ...

  9. Head Html Css 第二版笔记

    一. 引用 <blockquote>ago aog aogag </blockquote> 则是引用一大段文字并独立显示 二. <a> 创建目的地 <h2&g ...

  10. JavaPersistenceWithHibernate第二版笔记-第六章-Mapping inheritance-003Table per concrete class with unions(@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)、<union-subclass>)

    一.代码 1. package org.jpwh.model.inheritance.tableperclass; import org.jpwh.model.Constants; import ja ...

随机推荐

  1. coredata栈

    上下文包含所有信息 NSManagedObjectModel The NSManagedObjectModel instance describes the data that is going to ...

  2. Java的数组与内存控制

    1     数组基础 数组描述的是相同类型的若干个数据,按照一定的先后次序排列组合而成.其中,每一个数据称作一个数组元素(item),每个数组元素可以通过一个下标/索引来(index)访问它们. 数组 ...

  3. [web笔记]解决跨域问题以及axios每次提交session变化的问题

  4. MySQL基础教程——创建数据库并插入数据

    本节将介绍 MySQL 新建数据库,新建表,插入数据以及基本数据类型的相关知识.本节实验将创建一个名为 mysql_shiyan 的数据库,其中有两张表 employee和 department. 1 ...

  5. git clone 和 download 不一样,能用git clone 就用git clone,download的代码,经常出现安装bug

    git clone 和 download 不一样,能用git clone 就用git clone,download的代码,经常出现安装bug

  6. PAT (Basic Level) Practise (中文)- 1008. 数组元素循环右移问题 (20)

    一个数组A中存有N(N>0)个整数,在不允许使用另外数组的前提下,将每个整数循环向右移M(M>=0)个位置,即将A中的数据由(A0A1……AN-1)变换为(AN-M …… AN-1 A0  ...

  7. java基础—多态(动态加载)

    一.面向对象最核心的机制——动态绑定,也叫多态

  8. MySQL中同时存在创建和更新时间戳字段解决方法浅析

    MySQL中同时存在创建和更新时间戳字段解决方法浅析 明确我的MySQL版本.mysql> SELECT VERSION();+------------+| VERSION() |+------ ...

  9. Map集合应用 取出一个字符串中字母出现的次数。如:字符串:"abcdekka27qoq" ,输出格式为:a(2)b(1)k(2)...

    package com.swift; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import ...

  10. 解决cocos simpleAudioEngine播放mp3失败问题

    今天用cocos3.x版本实现游戏音乐播放发现一个坑,策划发来的mp3格式音频,用 simpleAudioEngine无法播放, 以为是路径问题,断点调试没找到,然后拷贝了cocos自带的mp3音频文 ...