The length of the shortest verse in the King James Version, that's easy to find : LENGTH « String « SQL / MySQL






The length of the shortest verse in the King James Version, that's easy to find

       
mysql>
mysql>
mysql> CREATE TABLE mytable
    -> (
    ->  bsect   ENUM('O','N') NOT NULL,                 # book section (testament)
    ->  bname   VARCHAR(20) NOT NULL,                   # book name
    ->  bnum    TINYINT UNSIGNED NOT NULL,              # book number
    ->  cnum    TINYINT UNSIGNED NOT NULL,              # chapter number
    ->  vnum    TINYINT UNSIGNED NOT NULL,              # verse number
    ->  vtext   TEXT NOT NULL                                   # text of verse
    -> ) TYPE = MyISAM;
Query OK, 0 rows affected, 1 warning (0.01 sec)

mysql>
mysql> SELECT MIN(LENGTH(vtext)) FROM mytable;
+--------------------+
| MIN(LENGTH(vtext)) |
+--------------------+
|               NULL |
+--------------------+
1 row in set (0.00 sec)

mysql>
mysql> drop table mytable;
Query OK, 0 rows affected (0.00 sec)

   
    
    
    
    
    
    
  








Related examples in the same category

1.LENGTH Function
2.LENGTH(RTRIM(SPACE(8)))
3.LENGTH(CONCAT(CAST(100000 AS CHAR(6)),'000'))
4.Length of trimmed varchar value
5.Get cases name and length in the production dept
6.Preserving Trailing Spaces in String Columns
7.Determine how many bytes are necessary for storing the data.
8.Lists names from the names table with the longest names first