Mysql????????????(???)
???????????? ???????[ 2017/3/3 10:13:17 ] ????????????? MySQL
?????.???????
????Mysql??????б??SQL?е????????????а??????????????(INTEGER??SMALLINT??DECIMAL??NUMBERIC)????????????????????(FLOAT??REAL??DOUBLE PRESISION)????????????????????
???????????????TINYINT??MEDIUMINT??BIGINT??3????????????Σ?????????BIT????????????λ?????
???????????? ??? ??Χ???з???? ??Χ???????? ???
????TINYINT 1??? (-128??127) (0??255) С?????
????SMALLINT 2??? (-32 768??32 767) (0??65 535) ???????
????MEDIUMINT 3??? (-8 388 608??8 388 607) (0??16 777 215) ???????
????INT??INTEGER 4??? (-2 147 483 648??2 147 483 647) (0??4 294 967 295) ???????
????BIGINT 8??? (-9 233 372 036 854 775 808??9 223 372 036 854 775 807) (0??18 446 744 073 709 551 615) ?????????
????FLOAT 4??? (-3.402 823 466 E+38??1.175 494 351 E-38)??0??(1.175 494 351 E-38??3.402 823 466 351 E+38) 0??(1.175 494 351 E-38??3.402 823 466 E+38) ????????????
????DOUBLE 8??? (1.797 693 134 862 315 7 E+308??2.225 073 858 507 201 4 E-308)??0??(2.225 073 858 507 201 4 E-308??1.797 693 134 862 315 7 E+308) 0??(2.225 073 858 507 201 4 E-308??1.797 693 134 862 315 7 E+308) ???????????
????DECIMAL ??DECIMAL(M??D) ?????M>D???M+2?????D+2 ??????M??D??? ??????M??D??? С???
????INT ????:
?????? MySQL ?????? 5 ??????????????? TINYINT??SMALLINT??MEDIUMINT??INT ?? BIGINT????Щ???????????????????????????洢??????С?????????
????MySQL ??????????????????????????? SQL ?????????????????????????????????????????????????????????????磬????????ε?????? INT(6)??
???????????????????????? 6 ?????????????м???????????????????????????????????????????????????????ε??С????????洢??????Χ??
?????????????????????δ洢???????????Χ???????MySQL ??????????Χ?????????????????д洢?????????????????????
????MySQL ???????漲???????????????? 0??
????UNSIGNED ???η??漲???????????????????????????????????????????????????????“λ”????????????????ο???洢??????Χ??
????ZEROFILL ???η??漲 0?????????????????油?????????????????η???????? MySQL ?????洢?????
????FLOAT??DOUBLE ?? DECIMAL ????
????MySQL ?????????????????? FLOAT??DOUBLE ?? DECIMAL ?????FLOAT ????????????????????????????? DOUBLE ??????????????????????????
?????????????????Щ????????и??????????????????????????С????????????????? FLOAT(7??3) ?漲???????????? 7 λ?????С?????????? 3 λ?????
????????С????????λ???????????Χ?????MySQL ?????????????????????????????????????
????DECIMAL ???????????????????????????У??????????????????????????????????????????????????????????????????Ч????????????
?????????????????С??????????λ??????????? DECIMAL(7??3) ?漲??洢????????? 7 λ?????????С????????? 3 λ??
???????? DECIMAL ???????????????????????η?????? MySQL ?????????б?????????????????ξ???????? 10????????????? 0??
????UNSIGNED ?? ZEROFILL ???η??????? FLOAT??DOUBLE ?? DECIMAL ??????????á?????Ч???? INT ?????????????
??????.?????????
????MySQL ????8?????????????????????:CHAR??VARCHAR??BINARY??VARBINARY??BLOB??TEXT??ENUM ??SET???????????????
????????洢???Χ??????????????????????????????????????
????????????? ????С ???????洢????
????CHAR 0-255??? ?????????
????VARCHAR 0-255??? ???????
????TINYBLOB 0-255??? ?????? 255 ?????????????????
????TINYTEXT 0-255??? ??????????
????BLOB 0-65535??? ???????????????????
????TEXT 0-65535??? ?????????
????MEDIUMBLOB 0-16 777 215??? ????????????е???????????
????MEDIUMTEXT 0-16 777 215??? ?е???????????
????LOGNGBLOB 0-4 294 967 295??? ?????????????????????
????LONGTEXT 0-4 294 967 295??? ???????????
????VARBINARY(M) ???????0-M???????????????????????+1?????
????BINARY(M) M ???????0-M???????????????
????CHAR ?? VARCHAR ????
????CHAR ?????????????????????????????????????????С???η??????塣?????С???η????Χ?? 0-255?????????????????????????????????С?????????????????
????CHAR ?????????? BINARY ???η????????????????????????η?? CHAR ??????????????????????????????????Сд??????
????CHAR ?????????????? VARCHAR ????????????????????????????????????????????Χ?? 0-255 ??????????CHAR ?? VARCHGAR ?????????? MYSQL ???????
?????????????????CHAR ???????С???????С????????????????????????? VARCHAR ?????????????????????洢????????????????
????(?????????????????洢?????????????)???洢??????????????????? VARCHAR ????????????????????????????????????
??????? VARCHAR ??????????????????????洢???????????????????????????????????? VARCHAR ?????????????????????洢Ч???
????VARCHAR ????????? BINARY ???η???? CHAR ????????????
????TEXT ?? BLOB ????
??????????γ???????? 255 ????????£?MySQL ???? TEXT ?? BLOB ?????????????洢??????С????????в?????????????Щ?????????????洢?????????
???????????????????????????
????TEXT ?? BLOB ?????????????????????BLOB ?????????Сд???? TEXT ???????Сд????С???η?????????? BLOB ?? TEXT ???????
??????????????????Χ???????????????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11