Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Kiryuu Sakuya
Database-test
Commits
6fe91872
Verified
Commit
6fe91872
authored
Dec 17, 2019
by
Kiryuu Sakuya
🎵
Browse files
Update No.2
parent
64b5371d
Changes
1
Hide whitespace changes
Inline
Side-by-side
02. 某电影资料数据库.md
View file @
6fe91872
...
...
@@ -266,6 +266,10 @@ FROM
### 7. 编写一个存储过程,输入为一日期字符串(格式为 `yyyy-MM-dd`)和制作电影的公司名称,如果该公司的电影上映时间晚于输入中日期字符串的时间且其票价小于 100 ,则增加其原票价的 20%,如果其票价大于等于 100,则增加其原票价的 10%。同时按该公司的电影的上映时间从早到晚的顺序分别打印一行字符串「电影名称 & 票价」
```
mysql
-- 设置一个过程来获取「日期、制作电影公司名称」,然后通过变量赋值
-- 通过游标将输入值与变量值进行对比,然后进行赋值变量的操作
-- 最后输出
DELIMITER //
CREATE PROCEDURE Add_Price(IN input_date DATE, IN input_corpname VARCHAR(30))
BEGIN
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment