MySQL database best practice of choosing data types during database design

Below is list of prefered database types with lengths:

Email : varchar(254)

Domain: varchar(254)

Password: char(32)


Financial Data : decimal(10,2)

Latitude: decimal(10,8)

Longitude: decimal(11,8)

Please write comment in case above information is incorrect. Please also share more fields in comment and I will update them here. This will help newbie developer.


Mysql order varchar column like Excel

CREATE TABLE IF NOT EXISTS `varchar_order_by` (
  `text` varchar(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`text`)

INSERT INTO `varchar_order_by` (`text`) VALUES

Mysql Query

select text regexp '[a-zA-Z\s]' ,
text + 0 ,
text regexp '[a-zA-Z\s]' AND text + 0,
text from varchar_order_by
order by
text regexp '[a-zA-Z\s]' asc,
text regexp '[a-zA-Z\s]' AND text + 0 desc,
text + 0 asc,
text asc