mysql个人笔记
来源:互联网 发布:勒索病毒 开启端口 编辑:程序博客网 时间:2024/06/02 06:27
show databases;
use dbname;
show tables;
desc tablename;
create table new_table (
id varchar(12) primary not null default 0,
name varchar(20),
age int,
area varchar(10));
insert into new_table(
id,name,age,area)
values
('12345','jim',21,'beijing');
drop table new_table;
增删插()
alter table new_table add sex ;
导出数据表文件》》 select new_table from jxc into outfile 'd:/t.xlsx;'
select new_table from jxc into outfile 'd:/t.txt;'( 解决乱码问题:select new_table from jxc into outfile 'd:/t.txt' CHARACTER SET gbk; OK)
使用查询结果创建表》》 首先说明MYSQL不支持:Select * Into new_table_name from old_table_name;
使用下面两个方法:
1、Create table new_table_name (Select * from old_table_name);
select * into new_table_name from old_table_name;
2、SELECT * INTO OUTFILE 'a.txt' FROM table_name;
LOAD DATA INFILE '/database/mysql/a.txt' INTO TABLE new_table_name;
- mysql个人笔记
- MySql技巧个人笔记
- mysql个人笔记
- mysql 个人笔记
- mysql事务 个人笔记
- 【个人笔记】mysql重安
- FreeBSD 安装Mysql apache PHP 个人笔记
- MySQL优化建议--个人学习笔记
- MySQL简单的触发器,个人笔记
- 个人学习Mysql中的一些笔记
- mysql建表常用语句 个人笔记分享
- MySQL随堂笔记| 深度结合个人理解
- java使用hibernate输出mysql数据库代码(个人笔记)
- 页面获取MySQL时间转换(个人菜鸟笔记)
- 个人笔记
- 个人笔记
- 个人笔记
- 个人笔记
- SocketServer
- python 注意的语法
- C#枚举
- 宁铂
- 还记得我们折腾过的居中么?
- mysql个人笔记
- You Are the One - HDU 4283 dp
- 第9周 项目6-1 百鸡百钱
- Add Two Numbers
- linux编辑文件
- Python--Queue
- 黑马程序员--java入门之常用dos命令
- hibernate之7.one2many双向
- 编程珠玑 第一章第9题 空间换时间的数据结构问题