Notes about First Database assignment

这篇博客介绍了在MySQL数据库作业中遇到的问题和解决方案,包括时间戳差值计算,函数定义的语法,以及在特定查询条件下的顾客线路筛选问题。作者探讨了如何正确处理时间戳相减的结果,并解释了在触发器中更改分隔符以避免歧义。此外,还讨论了尝试处理不确定线路数量时遇到的'缺少END'错误。
摘要由CSDN通过智能技术生成

keep updating...

the script and document of this assignment can be downloaded from 点击打开链接

And here are notes about problems in this assignment:


Q2.

what format of data will it return if we compute two timestamp data?


so we know that, timestamp is shown as YYYY(year)MM(month)DD(day)HH(hour)MM(month)SS(second).

so if we compute (endTime - startTime) directly, the result will be (endTime(minute) - startTime(minute)) * 100 + (endTime(second) - endTime(second)).

so we should call time_to_sec to change this type of data to the type we want.

Q6.

Here, i'd like to discuss the usage of function.

this is the format of a simple function:


                
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值