久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      mysql substring()函數(shù)怎么用

      在mysql中,substring()函數(shù)用于截取字符串,可以從字符串從特定位置開始返回一個給定長度的子字符串,語法為“SUBSTRING(字符串,n)”,參數(shù)“n”的值需要是一個整數(shù),用于指定子串的起始字符,可以為負值。若參數(shù)“n”為負值,則子串的位置起始于字符串結尾的第n個字符,即倒數(shù)第n個字符,而不是字符串的開頭位置。

      mysql substring()函數(shù)怎么用

      本教程操作環(huán)境:windows7系統(tǒng)、mysql8版本、Dell G3電腦。

      mysql substring()函數(shù):截取字符串

      substring()函數(shù)可以從字符串從特定位置開始截取一個給定長度的子字符串并返回。語法:

      SUBSTRING(s,n,len)

      從字符串 s 返回一個長度同 len 字符相同的子字符串,起始于位置 n。

      • n參數(shù)是一個整數(shù),用于指定子串的起始字符,n可以是負值。

        如果n為正值,則SUBSTRING函數(shù)從字符串的開始處提取子字符串。請參閱以下字符串。mysql substring()函數(shù)怎么用

        如果n為負值,則子字符串的位置起始于字符串結尾的第 n 個字符,即倒數(shù)第 n 個字符,而不是字符串的開頭位置。

      • len參數(shù)可省略,指定子串長度

      substring()函數(shù)使用示例

      1、len參數(shù)省略

      從“MySQL SUBSTRING”字符串中獲取子字符串:“SUBSTRING”,子串的位置必須從7開始

      mysql> SELECT SUBSTRING('MYSQL SUBSTRING', 7);

      mysql substring()函數(shù)怎么用

      請注意,如果n參數(shù)為零,則SUBSTRING函數(shù)返回一個空字符串:

      mysql> SELECT SUBSTRING('MYSQL SUBSTRING', 0);

      mysql substring()函數(shù)怎么用

      mysql> SELECT SUBSTRING('MySQL SUBSTRING', -10);

      mysql substring()函數(shù)怎么用

      2、len參數(shù)不省略

      mysql> SELECT SUBSTRING('MySQL SUBSTRING',1,5);

      mysql substring()函數(shù)怎么用

      贊(0)
      分享到: 更多 (0)
      ?
      網(wǎng)站地圖   滬ICP備18035694號-2    滬公網(wǎng)安備31011702889846號