Mysql数据库基础操作
来源:互联网 发布:淘宝宝贝限时打折 编辑:程序博客网 时间:2024/06/01 08:30
//连接数据库;mysql -uroot -hlocalhost -p//修改数据库密码;use mysql;update user set password=password("123456") where user="root";FLUSH PRIVILEGES; //数据库增删改查crud(增加create,查询read,修改update,删除delete);//创建表;create table carmack_on(id int auto_increment primary key,name varchar(30) not null,user varchar(30) not null,password varchar(40) not null)character set gbk collate gbk_chinese_ci;//修改列名字;alter table carmack_on change name namer int;//增加列;alter table carmack_on add ok varchar(30);//删除列;alter table carmack_on drop ok;//修改列属性;alter table goods modify id varchar(40);//修改表名字;rename table carmack_on to carmack_one;//修改库名字(数据表转到新库);rename table carmack_on to test.carmack_on;
//增数据insert into carmack_one (name,user) values ("王凯","root");//如果要增加所有字段值可省略字段名顺序不乱//删数据delete from carmack_one where 1//删除一定要条件比较严格不可逆;//改数据update carmack_one set user="gaihao" where 1;//查数据select *{列名} from carmack_one where 1{条件 1位默认}//where fenshu>=90;
0 0
- mysql数据库基础操作
- MySQL数据库操作基础
- MySql数据库基础操作
- Mysql数据库基础操作
- mysql数据库基础--数据库操作
- MySQL 数据库基础操作类
- Mysql数据库的基础操作
- python-基础-操作mysql数据库
- MySQL基础-数据库基本操作
- MySQL数据库的操作基础
- MySQL数据库的基础操作
- 【MySQL】数据库操作基础笔记
- python 操作mysql数据库基础
- java程序基础操作MySQL数据库
- MySQL基础2---数据库的基本操作
- 数据库设计以及mysql操作基础
- mysql基础指令和数据库基本操作
- JDBC数据库基础操作(Mysql)
- 黑马入学测试—基础—日期格式的工具类
- 浅析三层架构与MVC模式的区别
- mac下解压bin文件
- MVC与三层架构区别
- 黑马入学测试—基础—中文编码知识总结
- Mysql数据库基础操作
- Git 简单使用步骤
- svn基本使用
- 百度开源的数据可视化工具eCharts真心不错
- swift UITableViewCell拷贝
- Windows SDK应用
- UVa-11729 - Commando War:简单题
- android短信验证码自动填写
- 总结&备忘:__stdcall,__cdecl,extern "C"