pgSql

语法 to_number(text, text)

例子 select to_number(trim(both 'ibs' from classname), '999999') as cn from bbs order by cn   /*trim(both 'ibs' from classname)去除classname字段中的'ibs'字符*/

mySql

语法 str*1 / str+1 / -str  /*str为varchar的数字,此处不一定是1,只要是数字即可*/

hql

语法 to_number(text, text)

 

例子 select b from BBS b where b.isDeleted=false order by to_number(trim(both 'ibs' from b.className), '999999')

 

 

 

pgSql数据类型格式化函数 

相关文章:

  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2022-02-12
  • 2021-12-10
  • 2021-12-20
  • 2021-12-12
  • 2022-02-08
猜你喜欢
  • 2021-05-22
  • 2021-12-18
  • 2022-12-23
  • 2021-11-07
  • 2022-02-08
  • 2022-12-23
相关资源
相似解决方案