2

[TIL] Mysql Stuff

 2 years ago
source link: https://dev.to/rakeshsagar64/til-mysql-stuff-3l9g
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
[TIL] Mysql Stuff

1) mysql has a json type and the subjectively less interesting spatial types (more r&d coming soon).

2) mysql has a decimal type where you can specify exact number of digits. egs:- some_col DECIMAL(5,2); where 5 is the scale ie number of digits and 2 is the precision ie the number of digits after the decimal.

3) the int column can be declared in these ways
...int, ...
...int(10), ...
...int(10) unsigned, ...
...int(10) unsigned zerofill, ...

4) the '8' int(8) refers to the number of padding to the left of the number not the size/length of the number, and it becomes obvious when zerofill is added.Here is a screen shot i took just for you

5) Timestamp converts data into utc and back where as date time stores data as is.
Here's a link to a post by someone who takes the chore of writing articles much more seriously.

Conclusion (da ta daaa) this is first of (hopefully) many articles (atleast one per week). Any form of constructive critisism is always welcome with open arms. So.. see you around i guess ${insert akward goodbye}.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK