zoukankan      html  css  js  c++  java
  • utf-8的mysql表笔记

    链接数据库指定编码集jdbc:mysql://192.168.2.33:3306/mybase?useUnicode=true&characterEncoding=UTF-8

    mysql默认链接数量15 端口3306 y@ngmin9
    create database mybase character set utf-8;
    use mybase;
    drop table students;
    create table students(
    name char(8),
    sex char(4),
    age tinyint unsigned not null,
    tel char(13) null default "-"
    )default charset=utf8;
    set names gbk;
    /*
    方法一:在插入中文之前 先输命令set names gbk 告诉客户端你在这里敲的命令是GBK编码的 客户端会把你接下来敲的命令转成
    UTF-8 你数据库内部的编码还是UTF-8
    */
    insert into students(name, sex, age, tel) value("张彭洋明","man", 25, "15388128692");

    select * from students;
    insert into students(name, sex, age) value("张彭","男", 23);
    update students set sex="男" where name="张彭洋明";
    delete from students where name="yangming" and tel="15388128692";

  • 相关阅读:
    KnowYoueSelf
    计算机组成原理--海明码的编码和校验方法(易懂)
    html5新特性
    web前端性能优化
    web标准
    《王者归来》笔记-安全&性能01
    vue核心最基本功能
    BOM&DOM
    JavaScript-语法
    前端04
  • 原文地址:https://www.cnblogs.com/pyfreshman/p/4643090.html
Copyright © 2011-2022 走看看