mysql-cn's People
mysql-cn's Issues
第131节,codespaces输入不了中文
Section 5: SQL字符串相关处理办法
Section 8: Data Type之数值类型
第13节,“环境”应改成“欢迎”
第87节,默认的system_time_zone不同
第27讲,int显示稍有不同
第80节,mysql显示warning:Specifying number of digits for floating point data types is deprecated and will be removed in a future release
Section 3: Data Insert数据插入
第86节,mysql8 的 timestamp可以为空了
第132节,创建utf8的database,显示warning
第42节,source test.sql文件找不到
Section 12: MySQL内置函数串讲
第78节,mysql8 与视频不同
Section 9: Data Type之日期时间类型
问题描述
MySQL 8中,默认datetime和timestamp都是可以为空,且默认值为NULL。
问题发生在第几章第几节
有解决办法么?
在MySQL 7中,如果未指定TIMESTAMP列的默认值,则其默认为CURRENT_TIMESTAMP。这意味着,如果插入新行时未显式指定TIMESTAMP列的值,则该列将被自动设置为当前时间,同时EXTRA为ON UPDATE CURRENT_TIMESTAMP。
而在MySQL 8中,如果未指定TIMESTAMP列的默认值,则其默认为NULL。这意味着,如果插入新行时未显式指定TIMESTAMP列的值,则该列将被设置为NULL。
需要注意的是,虽然默认值如此,但是我们仍然可以通过在创建表时为TIMESTAMP列或DATETIME列指定参数来达到我们想要的效果。例如:
● NOT NULL:不为空
● DEFAULT CURRENT_TIMESTAMP:默认为当前数据库系统时间,可通过select now();查看。
● ON UPDATE CURRENT_TIMESTAMP:当该行有更新时,该时间字段自动更新为当前时间。
测试用的Mysql版本
MySQL8
第14节,“下面”应改成“上面”
Section 8: Data Type之数值类型
Section15: MySQL编码问题
第115节,已移除password功能
Section 2: Database和Table
第81节,视频没显示,但mysql8可以显示。
最后,使用codespaces注意事项。
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.