上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页
摘要: 描述 将titles_test表名修改为titles_2017。 CREATE TABLE IF NOT EXISTS titles_test ( id int(11) not null primary key, emp_no int(11) NOT NULL, title varchar(50)  阅读全文
posted @ 2021-11-14 20:30 杜嘟嘟 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 描述 将id=5以及emp_no=10001的行数据替换成id=5以及emp_no=10005,其他数据保持不变,使用replace实现,直接使用update会报错。 CREATE TABLE titles_test ( id int(11) not null primary key, emp_no 阅读全文
posted @ 2021-11-14 20:22 杜嘟嘟 阅读(32) 评论(0) 推荐(0) 编辑
摘要: 描述 将所有to_date为9999-01-01的全部更新为NULL,且 from_date更新为2001-01-01。CREATE TABLE IF NOT EXISTS titles_test (id int(11) not null primary key,emp_no int(11) NOT 阅读全文
posted @ 2021-11-14 18:17 杜嘟嘟 阅读(34) 评论(0) 推荐(0) 编辑
摘要: 描述 删除emp_no重复的记录,只保留最小的id对应的记录。CREATE TABLE IF NOT EXISTS titles_test (id int(11) not null primary key,emp_no int(11) NOT NULL,title varchar(50) NOT N 阅读全文
posted @ 2021-11-14 13:09 杜嘟嘟 阅读(48) 评论(0) 推荐(0) 编辑
摘要: SQL40 在last_update后面新增加一列名字为create_date 描述 存在actor表,包含如下列信息: CREATE TABLE actor ( actor_id smallint(5) NOT NULL PRIMARY KEY, first_name varchar(45) NO 阅读全文
posted @ 2021-11-11 12:57 杜嘟嘟 阅读(63) 评论(0) 推荐(0) 编辑
摘要: 描述 针对salaries表emp_no字段创建索引idx_emp_no,查询emp_no为10005,使用强制索引。CREATE TABLE `salaries` (`emp_no` int(11) NOT NULL,`salary` int(11) NOT NULL,`from_date` da 阅读全文
posted @ 2021-11-11 10:51 杜嘟嘟 阅读(52) 评论(0) 推荐(0) 编辑
摘要: 描述 针对actor表创建视图actor_name_view,只包含first_name以及last_name两列,并对这两列重新命名,first_name为first_name_v,last_name修改为last_name_v: drop table if exists actor; CREAT 阅读全文
posted @ 2021-11-03 15:38 杜嘟嘟 阅读(77) 评论(0) 推荐(0) 编辑
摘要: 描述 针对如下表actor结构创建索引: (注:在 SQLite 中,除了重命名表和在已有的表中添加列,ALTER TABLE 命令不支持其他操作, mysql支持ALTER TABLE创建索引) CREATE TABLE actor ( actor_id smallint(5) NOT NULL  阅读全文
posted @ 2021-11-03 15:13 杜嘟嘟 阅读(71) 评论(0) 推荐(0) 编辑
摘要: 在配置文件上配置相应路径 在application.yml中添加 加入图片 将图片放入{项目名}/src/main/resources/static目录下。 如 如下图中目录下的test.jpg文件 3、通过url访问 在浏览器中输入:localhost:8080/test.jpg,即可访问。发布后 阅读全文
posted @ 2021-11-02 16:27 杜嘟嘟 阅读(1624) 评论(0) 推荐(0) 编辑
摘要: 描述 对于如下表actor,其对应的数据为: actor_id first_name last_name last_update 1 PENELOPE GUINESS 2006-02-15 12:34:33 2 NICK WAHLBERG 2006-02-15 12:34:33 请你创建一个acto 阅读全文
posted @ 2021-11-02 14:06 杜嘟嘟 阅读(15) 评论(0) 推荐(0) 编辑
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 18 下一页