上一页 1 ··· 8 9 10 11 12 13 14 15 下一页
摘要: (一)视图的介绍 一、什么是视图? 视图是一个虚拟表,它是一个虚拟表,它不在数据库中以存储的形式保存(本身不包含数据),是在使用视图的时候动态生成。 二、视图的优点? 1、提高查询效率 数据库中的数据查询非常复杂,可以简化sql语句2、安全 有些保密字段,可以通过创建视图限制用户对某些字段进行操作 阅读全文
posted @ 2025-03-01 17:54 君庭 阅读(26) 评论(0) 推荐(0)
摘要: 一、建表语句 已知2张基本表:部门表:dept (部门号,部门名称);员工表 emp(员工号,员工姓名,年龄,入职时间,收入,部门号) CREATE table dept(dept1 VARCHAR(6),dept_name VARCHAR(20)) default charset=utf8; IN 阅读全文
posted @ 2025-03-01 15:55 君庭 阅读(31) 评论(0) 推荐(0)
摘要: 一、建表 create table student( stu_no int, stu_name varchar(10), sex char(1), age int(3), edit varchar(20) ) DEFAULT charset=utf8; insert into student val 阅读全文
posted @ 2025-02-28 19:10 君庭 阅读(25) 评论(0) 推荐(0)
摘要: 一、建表语句: 已知2张基本表: 部门表:dept (部门号,部门名称); 员工表 emp(员工号,员工姓名,年龄,入职时间,收入,部门号) CREATE table dept(dept1 VARCHAR(6),dept_name VARCHAR(20)) default charset=utf8; 阅读全文
posted @ 2025-02-28 15:23 君庭 阅读(29) 评论(0) 推荐(0)
摘要: 一、表格 员工表 sid:员工编号、name:姓名、age:年龄、woektime_start 入职时间,incoming工资 dept2 部门编号 部门表 dept1 部门编号,dept_name 部门名称 二、建表语句 CREATE table dept( dept1 VARCHAR(6), d 阅读全文
posted @ 2025-02-28 15:08 君庭 阅读(16) 评论(0) 推荐(0)
摘要: 二、聚合函数 (1)max 最小值 select max(math) from student (2)min 最大值 select min(math) from student (3)sum 总数 select sum(math) from student (4)avg平均数 select avg( 阅读全文
posted @ 2025-02-27 16:27 君庭 阅读(15) 评论(0) 推荐(0)
摘要: 一、查询语句 1、select查询一个表中的所有数据 格式: select * from 表名 ; 案例: select * from student ; 2、查询部分字段信息数据 格式: select 字段1,字段2 from 表名; 案例: select name,math from stude 阅读全文
posted @ 2025-02-27 15:59 君庭 阅读(56) 评论(0) 推荐(0)
摘要: 一、新建表 二、建表语句 create table student( id int primary key , name char(20), sex char(10), age int(3), mobile char(20), class char(10), english int(10), chi 阅读全文
posted @ 2025-02-27 10:00 君庭 阅读(36) 评论(0) 推荐(0)
摘要: 1、下载navicat 包 2、解压 3、找到navicat.exe 4 .密钥 NAVH-WK6A-DMVK-DKW3 5、查看ip地址 图片 6、关闭防火墙 ervice iptables stop 7、连接配置编写 8、点击确定连接,显示如下 以上表示连接成功 9、打开查询中,新建查询 10、 阅读全文
posted @ 2025-02-26 20:42 君庭 阅读(30) 评论(0) 推荐(0)
摘要: 一、进入数据库方法: 1、mysql -u root -p 使用库use 库名 2、navicat 连接数据库操作 2、建表语句 格式: create TABLE 表名(字段名1 字符类型(字符长度1),字段名1 字符类型(字符长度2)); 案例1: create table a1(id int(1 阅读全文
posted @ 2025-02-26 20:31 君庭 阅读(13) 评论(0) 推荐(0)
上一页 1 ··· 8 9 10 11 12 13 14 15 下一页