DEV Community

Rakesh Sagar
Rakesh Sagar

Posted on

[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, ..., ... unsigned, ... 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
Zerofill screen shot

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}.

Top comments (0)