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";

  • 相关阅读:
    存储过程
    需要再研究的题目
    sql(SqlServer)编程基本语法
    sql查询语句
    SQL常用增删改查语句
    SQLserver
    三大范式
    四种约束
    数据库
    学习实践:使用模式,原则实现一个C++自动化测试程序
  • 原文地址:https://www.cnblogs.com/pyfreshman/p/4643090.html
Copyright © 2011-2022 走看看