摘要: 一、 mysql> use test Database changed mysql> create table if not exists branch( -> branchNo varchar(5) primary key, -> street varchar(30) not null, -> c 阅读全文
posted @ 2022-04-09 20:38 熊猫怪物 阅读(28) 评论(0) 推荐(0)
摘要: 一、对已存在的表添加主键约束 mysql> alter table dept add primary key(deptno); Query OK, 0 rows affected (0.07 sec) Records: 0 Duplicates: 0 Warnings: 0 mysql> selec 阅读全文
posted @ 2022-04-09 13:55 熊猫怪物 阅读(314) 评论(0) 推荐(0)
摘要: 一、 插入数据: mysql> insert into employees(ename, age, birth, hiredate, sal, deptno) -> values -> ('zhaoyang', 24, '1993-07-17', '2021-10-18', 3000, 1), -> 阅读全文
posted @ 2022-04-09 13:04 熊猫怪物 阅读(34) 评论(0) 推荐(0)
摘要: create table if not exists emp( -> ename varchar(10), -> hiredate date, -> sal decimal(10,2), -> deptno int(2)); Query OK, 0 rows affected, 1 warning 阅读全文
posted @ 2022-04-09 12:27 熊猫怪物 阅读(33) 评论(0) 推荐(0)