会员可以在此提问,百战程序员老师有问必答
对大家有帮助的问答会被标记为“推荐”
看完课程过来浏览一下别人提的问题,会帮你学得更全面
截止目前,同学们一共提了 132456个问题
Python 全系列/第五阶段:数据库编程/mysql介绍与环境安装 12481楼

vue_shop.rar

image.png

老师你看看代码哪里出问题了,不显示登陆组件。

Python 全系列/第十阶段:Flask百战电商后台项目/Flask百战电商后台项目 12482楼
JAVA 全系列/第二阶段:JAVA 基础深化和提高/网络编程(旧) 12483楼
Python 全系列/第四阶段:函数式编程和核心特性/生成器、迭代器、动态性 12484楼
JAVA 全系列/第一阶段:JAVA 快速入门/面向对象详解和JVM底层内存分析 12486楼
Python 全系列/第五阶段:数据库编程/python操作mysql(旧) 12487楼
JAVA 全系列/第三阶段:数据库编程/MySQL数据库的使用 12488楼
Python 全系列/第七阶段:网页编程基础/面向对象编程 12491楼

老师:

    问题1:第一条语句可以搜索到,但是改成 ‘%2005’后一条都搜不到。

select last_name, hire_date from employees where hire_date like '%05';
select last_name, hire_date from employees where hire_date like '%2005';


    问题2:第一条语句可以匹配到一条,把 = 改成 like 后一条都没有,并且第三条语句的 '_7-8月-2005' 表示一个占位符的话应该也能匹配到一吧,但是却一个都匹配不到。

select last_name, hire_date from employees where hire_date = '17-8月-2005';
select last_name, hire_date from employees where hire_date like '17-8月-2005';
select  last_name,  hire_date  from  employees  where  hire_date  like  '_7-8月-2005';


实际运算时的情况如下:

SQL>  select last_name, hire_date from employees where hire_date like '%05';
LAST_NAME                 HIRE_DATE
------------------------- -----------
Kochhar                   2005/9/21
Austin                    2005/6/25
Chen                      2005/9/28
Sciarra                   2005/9/30
Baida                     2005/12/24
Tobias                    2005/7/24
Fripp                     2005/4/10
Vollman                   2005/10/10
Nayer                     2005/7/16
Bissot                    2005/8/20
Atkinson                  2005/10/30
Marlow                    2005/2/16
Stiles                    2005/10/26
Davies                    2005/1/29
Partners                  2005/1/5
Errazuriz                 2005/3/10
Tucker                    2005/1/30
Bernstein                 2005/3/24
Hall                      2005/8/20
Smith                     2005/3/10
LAST_NAME                 HIRE_DATE
------------------------- -----------
Doran                     2005/12/15
Vishney                   2005/11/11
Ozer                      2005/3/11
Hutton                    2005/3/19
Bull                      2005/2/20
Chung                     2005/6/14
Dilly                     2005/8/13
Everett                   2005/3/3
Fay                       2005/8/17
29 rows selected

SQL>  select last_name, hire_date from employees where hire_date like '%2005';
LAST_NAME                 HIRE_DATE
------------------------- -----------

SQL>  select last_name, hire_date from employees where hire_date = '17-8月-2005';
LAST_NAME                 HIRE_DATE
------------------------- -----------
Fay                       2005/8/17

SQL>  select last_name,   hire_date  from  employees  where  hire_date like '17-8月-2005';
LAST_NAME                 HIRE_DATE
------------------------- -----------

SQL>  select last_name, hire_date from employees where hire_date like '%7-8月-2005';
LAST_NAME                 HIRE_DATE
------------------------- -----------





JAVA 全系列/第三阶段:数据库编程/SQL 语言 12492楼
WEB前端全系列/第十七阶段:ReactNative跨平台应用开发框架/环境搭建与常用组件 12493楼

课程分类

百战程序员微信公众号

百战程序员微信小程序

©2014-2025百战汇智(北京)科技有限公司 All Rights Reserved 北京亦庄经济开发区科创十四街 赛蒂国际工业园
网站维护:百战汇智(北京)科技有限公司
京公网安备 11011402011233号    京ICP备18060230号-3    营业执照    经营许可证:京B2-20212637