数据库
可乐加冰°
这个作者很懒,什么都没留下…
展开
-
mysql函数
函数: version() # 用来查询当前数据库的版本mysql> select version();+-----------+| version() |+-----------+| 5.7.14 |+-----------+ user() # 查询当前登录用户mysql> select user();+----------------+| user() |+---------------...原创 2020-10-13 20:42:24 · 83 阅读 · 0 评论 -
多表查询作业
1.创建student和score表mysql> show tables;+-------------------+| Tables_in_t_books |+-------------------+| score || student || t_hero || worker || 工作日期表 |+-------------------+2.为student表和score表增加记...原创 2020-10-12 19:51:39 · 317 阅读 · 0 评论 -
MySQL数据的CRUD
这是我们原来的表中的数据,接下来对标进行CRUD1 增加(insert): insert into t_name[(字段1 ...)] values(v1 ....); insert into t_hero(id, username, gender, age, nickname) values(6, "张顺", 33, "男", 浪里白条);2 更新(update): 将表中原有数据修改为我们需要的数据 update t_name set 字段1 =...原创 2020-09-28 21:58:55 · 69 阅读 · 0 评论 -
创建数据库并插入数据
1,用create database t_books default character set utf8mb4; 命令先创建一个名叫hero的数据库2,show create database t_books; 查看所有数据库3 use t_books; 使用创建好的数据库4 create table t_hero( -> id int primary key, -> username varchar (100)not null unique...原创 2020-09-28 21:11:53 · 166 阅读 · 0 评论 -
Linux上安装MySQL的几种常用方式
一,通用二进制格式安装1,进https://downloads.mysql.com/archives/community/下载好需要的mysql版本,这里选择了mysql-5.7.14-linux-glibc2.5-x86_64.tar2、新建用户以安全方式运行进程groupadd -r -g 306 mysqluseradd -g 306 -r -u 306 mysql在这里306创建不成功的话就换成其他的3、安装并初始化mysql创建一个 /usr/local,然后用命令将原创 2020-09-25 23:55:20 · 231 阅读 · 0 评论