CREATE DATABASE SpringBootVue; USE SpringBootVue; CREATE TABLE t_movie(id BIGINT PRIMARY KEY AUTO_INCREMENT,title VARCHAR(255),rating DOUBLE); INSERT INTO t_movie(id,title,rating) VALUES(NULL,"金刚狼",8.7); INSERT INTO t_movie(id,title,rating) VALUES(NULL,"变形金刚",8.6) INSERT INTO t_movie(id,title,rating) VALUES(NULL,"蜘蛛侠",8.7) SELECT * FROM t_movie CREATE TABLE dept(deptno INT PRIMARY KEY,dname VARCHAR(255),loc VARCHAR(255)) INSERT INTO dept(deptno,dname,loc) VALUES(10,'销售部','北京') INSERT INTO dept(deptno,dname,loc) VALUES(20,'研发部','上海') INSERT INTO dept(deptno,dname,loc) VALUES(30,'技术部','广州') INSERT INTO dept(deptno,dname,loc) VALUES(40,'媒体部','深圳') SELECT * FROM dept
CREATE DATABASE SpringBootVue;
USE SpringBootVue;
CREATE TABLE t_movie(id BIGINT PRIMARY KEY AUTO_INCREMENT,title VARCHAR(255),rating DOUBLE);
INSERT INTO t_movie(id,title,rating) VALUES(NULL,"金刚狼",8.7);
INSERT INTO t_movie(id,title,rating) VALUES(NULL,"变形金刚",8.6)
INSERT INTO t_movie(id,title,rating) VALUES(NULL,"蜘蛛侠",8.7)
SELECT * FROM t_movie
CREATE TABLE dept(deptno INT PRIMARY KEY,dname VARCHAR(255),loc VARCHAR(255))
INSERT INTO dept(deptno,dname,loc) VALUES(10,'销售部','北京')
INSERT INTO dept(deptno,dname,loc) VALUES(20,'研发部','上海')
INSERT INTO dept(deptno,dname,loc) VALUES(30,'技术部','广州')
INSERT INTO dept(deptno,dname,loc) VALUES(40,'媒体部','深圳')
SELECT * FROM dept
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>部门列表</title> </head> <body> <h1 align="center">部门列表</h1> <hr> <table align="center" border="1px" width="50%"> <tr> <th>序号</th> <th>部门编号</th> <th>部门名称</th> <th>操作</th> </tr> <tr> <td>1</td> <td>10</td> <td>销售部</td> <td> <a href="javascript:void(0)" onclick="window.confirm('亲,确认删除该数据吗?')">删除</a> <a href="edit.html">修改</a> <a href="detail.html">详情</a> </td> </tr> <tr> <td>2</td> <td>20</td> <td>销售部</td> <td> <a href="javascript:void(0)" onclick="window.confirm('亲,确认删除该数据吗?')">删除</a> <a href="edit.html">修改</a> <a href="detail.html">详情</a> </td> </tr> <tr> <td>3</td> <td>30</td> <td>销售部</td> <td> <a href="javascript:void(0)" onclick="window.confirm('亲,确认删除该数据吗?')">删除</a> <a href="edit.html">修改</a> <a href="detail.html">详情</a> </td> </tr> </table> <hr> <a href="add.html">新增部门</a> </body> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>部门列表</title>
</head>
<body>
<h1 align="center">部门列表</h1>
<hr>
<table align="center" border="1px" width="50%">
<tr>
<th>序号</th>
<th>部门编号</th>
<th>部门名称</th>
<th>操作</th>
</tr>
<tr>
<td>1</td>
<td>10</td>
<td>销售部</td>
<td>
<a href="javascript:void(0)" οnclick="window.confirm('亲,确认删除该数据吗?')">删除</a>
<a href="edit.html">修改</a>
<a href="detail.html">详情</a>
</td>
</tr>
<tr>
<td>2</td>
<td>20</td>
<td>销售部</td>
<td>
<a href="javascript:void(0)" οnclick="window.confirm('亲,确认删除该数据吗?')">删除</a>
<a href="edit.html">修改</a>
<a href="detail.html">详情</a>
</td>
</tr>
<tr>
<td>3</td>
<td>30</td>
<td>销售部</td>
<td>
<a href="javascript:void(0)" οnclick="window.confirm('亲,确认删除该数据吗?')">删除</a>
<a href="edit.html">修改</a>
<a href="detail.html">详情</a>
</td>
</tr>
</table>
<hr>
<a href="add.html">新增部门</a>
</body>
</html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>新增部门</title> </head> <body> <h1>新增部门</h1> <hr> <form method="get" action="list.html"> 部门编号:<input type="text" name="deptno"/><br> 部门名称:<input type="text" name="dname"/><br> 部门位置:<input type="text" name="loc"/><br> <input type="submit" value="保存"/> </form> </body> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>新增部门</title>
</head>
<body>
<h1>新增部门</h1>
<hr>
<form method="get" action="list.html">
部门编号:<input type="text" name="deptno"/><br>
部门名称:<input type="text" name="dname"/><br>
部门位置:<input type="text" name="loc"/><br>
<input type="submit" value="保存"/>
</form>
</body>
</html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>修改部门</title> </head> <body> <h1>修改部门</h1> <hr> <form method="get" action="list.html"> 部门编号:<input type="text" name="deptno" value="20" readonly/><br> 部门名称:<input type="text" name="dname" value="销售部"/><br> 部门位置:<input type="text" name="loc" value="北京"/><br> <input type="submit" value="保存"/> </form> </body> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>修改部门</title>
</head>
<body>
<h1>修改部门</h1>
<hr>
<form method="get" action="list.html">
部门编号:<input type="text" name="deptno" value="20" readonly/><br>
部门名称:<input type="text" name="dname" value="销售部"/><br>
部门位置:<input type="text" name="loc" value="北京"/><br>
<input type="submit" value="保存"/>
</form>
</body>
</html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>部门详情</title> </head> <body> <h1>部门详情</h1> <hr> 部门编号:20<br> 部门名称:销售部<br> 部门位置:北京<br> <input type="button" value="后退" onclick="window.history.back()"/> </body> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>部门详情</title>
</head>
<body>
<h1>部门详情</h1>
<hr>
部门编号:20<br>
部门名称:销售部<br>
部门位置:北京<br>
<input type="button" value="后退" οnclick="window.history.back()"/>
</body>
</html>
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>欢迎页</title> </head> <body> <a href="list.html">查看部门列表</a> </body> </html>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>欢迎页</title>
</head>
<body>
<a href="list.html">查看部门列表</a>
</body>
</html>