lihuimingxs

在不同的数据库中,如何查询字段值长度?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;

分类:

技术点:

相关文章:

  • 2022-02-05
  • 2021-08-02
  • 2021-04-03
  • 2022-12-23
  • 2022-12-23
  • 2022-01-23
  • 2022-02-15
  • 2022-12-23
猜你喜欢
  • 2022-01-12
  • 2022-01-02
  • 2022-01-07
  • 2022-02-05
  • 2021-12-12
  • 2022-02-21
相关资源
相似解决方案