好得很程序员自学网

<tfoot draggable='sEl'></tfoot>

Mysql、Oracle、SQL-Server 查询字段值长度

在不同的数据库中,如何查询字段值长度?Mysql、Oracle、SQL-Server 中提供了不同的函数方法。

示例:

 -- 查询长度为11位的手机号
-- MySQL: length()
SELECT phone FROM address_book where length(phone) = 11;
-- Oracle: length()
SELECT phone FROM address_book where length(phone) = 11;
-- SQL Server: len()
SELECT phone FROM address_book where len(phone) = 11;
 

Mysql、Oracle、SQL-Server 查询字段值长度

标签:rom   add   sel   sql   不同   pre   rac   class   ddr   

查看更多关于Mysql、Oracle、SQL-Server 查询字段值长度的详细内容...

  阅读:37次