<div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"><span style="font-weight: bold">数据类型:数据类型时指列,存储过程参数、表达式和局部变量的<span style="color: #df402a">数据特征,它决定了数据的储存<span style="color: #df402a">格式,代表了不同的信息类型。(比如整数、字符、浮点数、日期、等等等……)</span></span></span></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px">选择数据类型要选择<span style="color: #df402a">最合理、<span style="color: #df402a">最合适的数据类型,而不是最大的数据类型。</span></span> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px">整数的五种类型:</div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px">(整数就是像-3,-2,-1,0,1,2,3,10等这样的数)</div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px">比如年龄就可以用整数数据类型。</div> <div style="text-align: left; float: none"><img src="https://img.php.cn/upload/article/000/000/001/b6142c11bcbdc18497c59eff80e528a1-0.png" alt="" style="max-width:90%" style="max-width:90%"></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"><span style="font-weight: bold">浮点型:</span></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px">比如工资有小数点,就用浮点型。</div> <div><img src="https://img.php.cn/upload/article/000/000/001/b6142c11bcbdc18497c59eff80e528a1-1.png" alt="" style="max-width:90%" style="max-width:90%"></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"><span style="font-weight: bold">日期时间型:</span></div> <div><img src="https://img.php.cn/upload/article/000/000/001/b6142c11bcbdc18497c59eff80e528a1-2.png" alt=""></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"> </div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px"><span style="font-weight: bold">字符型:</span></div> <div><img src="https://img.php.cn/upload/article/000/000/001/aa83607c47c12fd241eaeaf15944ec1c-3.png" alt="" style="max-width:90%" style="max-width:90%"></div> <div style="white-space: pre-wrap; text-align: left; line-height: 1.75; font-size: 14px;"> </div>