<output id="wh4rg"><font id="wh4rg"></font></output>

              <li id="wh4rg"><s id="wh4rg"></s></li>
              <li id="wh4rg"></li>
              <li id="wh4rg"><s id="wh4rg"></s></li>

              <dl id="wh4rg"><s id="wh4rg"><thead id="wh4rg"></thead></s></dl>

                1. <dl id="wh4rg"></dl><li id="wh4rg"><ins id="wh4rg"><strong id="wh4rg"></strong></ins></li>

                  1. <dl id="wh4rg"><ins id="wh4rg"></ins></dl><li id="wh4rg"></li>

                        1. <dl id="wh4rg"></dl>

                            1. <dl id="wh4rg"></dl>

                              1. <sub id="wh4rg"><address id="wh4rg"><p id="wh4rg"></p></address></sub>
                              2. <li id="wh4rg"><font id="wh4rg"><thead id="wh4rg"></thead></font></li>
                                    1. <li id="wh4rg"><ins id="wh4rg"></ins></li>

                                          <span id="wh4rg"></span>

                                          <dl id="wh4rg"></dl>

                                        1. <output id="wh4rg"></output>

                                                  1. <li id="wh4rg"></li>

                                                    <form id="wh4rg"></form>
                                                  2. <dl id="wh4rg"></dl>

                                                    1. <li id="wh4rg"></li>
                                                    2. <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                              <li id="wh4rg"></li>

                                                            1. <dl id="wh4rg"><ins id="wh4rg"><thead id="wh4rg"></thead></ins></dl>

                                                                <dl id="wh4rg"></dl>
                                                                1. <li id="wh4rg"><s id="wh4rg"></s></li>

                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                  <li id="wh4rg"><s id="wh4rg"></s></li>
                                                                2. <li id="wh4rg"></li>

                                                                  <output id="wh4rg"></output>

                                                                  1. <dl id="wh4rg"></dl>
                                                                    您的位置:太原网站建设 > 新闻动态 > 技术帮助 > 网站建设中Mysql新手常用的六个语句

                                                                    网站建设中Mysql新手常用的六个语句

                                                                    日期:2017/05/19     阅读:     来源:www.cglo.tw     作者:太原京轩科技
                                                                      网站建设中Mysql新手常用的六个语句    
                                                                       一、显示某一列出现过N次的值
                                                                        SELECTid
                                                                        FROMtbl
                                                                        GROUPBYid
                                                                        HAVINGCOUNT(*)=N;
                                                                        二、计算两个日子间的工作日
                                                                        所谓工作?#31449;?#26159;除出周六周日和节假日。
                                                                        SELECTCOUNT(*)
                                                                        FROMcalendar
                                                                        WHEREdBETWEENStartANDStop
                                                                        ANDDAYOFWEEK(d)NOTIN(1,7)
                                                                        ANDholiday=0;
                                                                        三、计算两个日子间的工作日
                                                                        所谓工作?#31449;?#26159;除出周六周日和节假日。
                                                                        SELECTCOUNT(*)
                                                                        FROMcalendar
                                                                        WHEREdBETWEENStartANDStop
                                                                        ANDDAYOFWEEK(d)NOTIN(1,7)
                                                                        ANDholiday=0;
                                                                        四、查看你的数库有多大
                                                                        SELECT
                                                                        table_schemaAS'DbName',
                                                                        Round(Sum(data_length+index_length)/1024/1024,3)AS'DbSize(MB)',
                                                                        Round(Sum(data_free)/1024/1024,3)AS'FreeSpace(MB)'
                                                                        FROMinformation_schema.tables
                                                                        GROUPBYtable_schema;
                                                                        五、两个时间的差
                                                                        取得两个datetime值的差。假设dt1和dt2是datetime类型,其格式为‘yyyy-mm-ddhh:mm:ss’,那么它们之间所差的秒数为:
                                                                        UNIX_TIMESTAMP(dt2)-UNIX_TIMESTAMP(dt1)除以60就是所差的分钟数,除以3600就是所差的小时数,再除以24就是所差的天数。
                                                                        六、计算年数
                                                                        你想通过生日来计算这个人有几岁了。
                                                                        SELECTDATE_FORMAT(FROM_DAYS(TO_DAYS(now())-TO_DAYS(@dateofbirth)),'%Y')+0;
                                                                        HAVINGCOUNT(*)=N;
                                                                    更多>>相关文章

                                                                        <output id="wh4rg"><font id="wh4rg"></font></output>

                                                                              <li id="wh4rg"><s id="wh4rg"></s></li>
                                                                              <li id="wh4rg"></li>
                                                                              <li id="wh4rg"><s id="wh4rg"></s></li>

                                                                              <dl id="wh4rg"><s id="wh4rg"><thead id="wh4rg"></thead></s></dl>

                                                                                1. <dl id="wh4rg"></dl><li id="wh4rg"><ins id="wh4rg"><strong id="wh4rg"></strong></ins></li>

                                                                                  1. <dl id="wh4rg"><ins id="wh4rg"></ins></dl><li id="wh4rg"></li>

                                                                                        1. <dl id="wh4rg"></dl>

                                                                                            1. <dl id="wh4rg"></dl>

                                                                                              1. <sub id="wh4rg"><address id="wh4rg"><p id="wh4rg"></p></address></sub>
                                                                                              2. <li id="wh4rg"><font id="wh4rg"><thead id="wh4rg"></thead></font></li>
                                                                                                    1. <li id="wh4rg"><ins id="wh4rg"></ins></li>

                                                                                                          <span id="wh4rg"></span>

                                                                                                          <dl id="wh4rg"></dl>

                                                                                                        1. <output id="wh4rg"></output>

                                                                                                                  1. <li id="wh4rg"></li>

                                                                                                                    <form id="wh4rg"></form>
                                                                                                                  2. <dl id="wh4rg"></dl>

                                                                                                                    1. <li id="wh4rg"></li>
                                                                                                                    2. <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                              <li id="wh4rg"></li>

                                                                                                                            1. <dl id="wh4rg"><ins id="wh4rg"><thead id="wh4rg"></thead></ins></dl>

                                                                                                                                <dl id="wh4rg"></dl>
                                                                                                                                1. <li id="wh4rg"><s id="wh4rg"></s></li>

                                                                                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                                  <li id="wh4rg"><s id="wh4rg"></s></li>
                                                                                                                                2. <li id="wh4rg"></li>

                                                                                                                                  <output id="wh4rg"></output>

                                                                                                                                  1. <dl id="wh4rg"></dl>
                                                                                                                                    126期平码

                                                                                                                                        <output id="wh4rg"><font id="wh4rg"></font></output>

                                                                                                                                              <li id="wh4rg"><s id="wh4rg"></s></li>
                                                                                                                                              <li id="wh4rg"></li>
                                                                                                                                              <li id="wh4rg"><s id="wh4rg"></s></li>

                                                                                                                                              <dl id="wh4rg"><s id="wh4rg"><thead id="wh4rg"></thead></s></dl>

                                                                                                                                                1. <dl id="wh4rg"></dl><li id="wh4rg"><ins id="wh4rg"><strong id="wh4rg"></strong></ins></li>

                                                                                                                                                  1. <dl id="wh4rg"><ins id="wh4rg"></ins></dl><li id="wh4rg"></li>

                                                                                                                                                        1. <dl id="wh4rg"></dl>

                                                                                                                                                            1. <dl id="wh4rg"></dl>

                                                                                                                                                              1. <sub id="wh4rg"><address id="wh4rg"><p id="wh4rg"></p></address></sub>
                                                                                                                                                              2. <li id="wh4rg"><font id="wh4rg"><thead id="wh4rg"></thead></font></li>
                                                                                                                                                                    1. <li id="wh4rg"><ins id="wh4rg"></ins></li>

                                                                                                                                                                          <span id="wh4rg"></span>

                                                                                                                                                                          <dl id="wh4rg"></dl>

                                                                                                                                                                        1. <output id="wh4rg"></output>

                                                                                                                                                                                  1. <li id="wh4rg"></li>

                                                                                                                                                                                    <form id="wh4rg"></form>
                                                                                                                                                                                  2. <dl id="wh4rg"></dl>

                                                                                                                                                                                    1. <li id="wh4rg"></li>
                                                                                                                                                                                    2. <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                                                                                              <li id="wh4rg"></li>

                                                                                                                                                                                            1. <dl id="wh4rg"><ins id="wh4rg"><thead id="wh4rg"></thead></ins></dl>

                                                                                                                                                                                                <dl id="wh4rg"></dl>
                                                                                                                                                                                                1. <li id="wh4rg"><s id="wh4rg"></s></li>

                                                                                                                                                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                                                                                                  <dl id="wh4rg"><ins id="wh4rg"></ins></dl>

                                                                                                                                                                                                  <li id="wh4rg"><s id="wh4rg"></s></li>
                                                                                                                                                                                                2. <li id="wh4rg"></li>

                                                                                                                                                                                                  <output id="wh4rg"></output>

                                                                                                                                                                                                  1. <dl id="wh4rg"></dl>