随笔分类 -  SQL

摘要:1.将时间增加一天 SELECT DATE_ADD(create_at,INTERVAL 1 DAY) FROM courses; 2.计算从 2019 年 03 月 26 日到创建时间(created_at)相差的天数,结果列名以 date_diff 显示 select DATEDIFF(crea 阅读全文
posted @ 2022-11-29 09:27 夷某蓁 阅读(62) 评论(0) 推荐(0) 编辑
摘要:描述 请编写 SQL 语句,查询 courses 表,计算从 2019 年 03 月 26 日到创建时间(created_at)相差的天数,结果列名以 date_diff 显示 。 表定义:courses(课程表) 列名 类型 注释 id int unsigned 主键 name varchar 课 阅读全文
posted @ 2022-11-23 17:09 夷某蓁 阅读(254) 评论(0) 推荐(0) 编辑
摘要:刷到牛客网的sql必知必会5,编辑器的补全不太习惯。迫懒,去官网翻出建表语句如下。附上.sql,但库需要自己建。酱紫https://shanle.lanzout.com/iFrMs01htf2f######################################## # MySQL Cras 阅读全文
posted @ 2022-03-15 14:20 夷某蓁 阅读(88) 评论(0) 推荐(0) 编辑
摘要:+表结构 | emp_no | birth_date | first_name | last_name | gender | hire_date | + + + + + + + | 10001 | 1953-09-02 | Georgi | Facello | M | 1986-06-26 | | 阅读全文
posted @ 2022-03-11 16:29 夷某蓁 阅读(213) 评论(0) 推荐(0) 编辑
摘要:表结构+ + + + + + + | emp_no | birth_date | first_name | last_name | gender | hire_date | + + + + + + + | 10001 | 1953-09-02 | Georgi | Facello | M | 198 阅读全文
posted @ 2022-03-11 11:39 夷某蓁 阅读(75) 评论(0) 推荐(0) 编辑
摘要:+表结构 + + + + + + | emp_no | birth_date | first_name | last_name | gender | hire_date | + + + + + + + | 10001 | 1953-09-02 | Georgi | Facello | M | 198 阅读全文
posted @ 2022-03-11 11:31 夷某蓁 阅读(61) 评论(0) 推荐(0) 编辑
摘要:+ + + + +| emp_no | salary | from_date | to_date |+ + + + +| 10001 | 60117 | 1986-06-26 | 1987-06-26 || 10001 | 62102 | 1987-06-26 | 1988-06-25 || 100 阅读全文
posted @ 2022-03-11 11:20 夷某蓁 阅读(610) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示
🚀
回顶
收起