当前位置: 首页 > news >正文

简单的cms建站系统ih5制作平台官网

简单的cms建站系统,ih5制作平台官网,黑龙江建设网官网住房和城乡厅官网,网站后台如何更改背景 整型除以整型#xff0c;正常情况下当然得到的应该也是整型。数据库也是这么干的。 但是在数据库应用中#xff0c;通常业务的需求是得到NUMERIC#xff0c;不能直接把小数干掉。 数据库的行为给用户带来了诸多不便#xff0c;例如1除以2#xff0c;如果是整型除法会… 背景 整型除以整型正常情况下当然得到的应该也是整型。数据库也是这么干的。 但是在数据库应用中通常业务的需求是得到NUMERIC不能直接把小数干掉。 数据库的行为给用户带来了诸多不便例如1除以2如果是整型除法会得到0然而用户可能要的是0.5。 那么怎么处理呢 1、建议用户使用float8, money, numeric来存储这种数值。 2、或者在除法时对操作数进行转换。 操作符 postgres# \do / List of operators Schema | Name | Left arg type | Right arg type | Result type | Function | Description --------------------------------------------------------------------------------------------------------------------- pg_catalog | / | bigint | bigint | bigint | int8div | divide pg_catalog | / | bigint | integer | bigint | int84div | divide pg_catalog | / | bigint | smallint | bigint | int82div | divide pg_catalog | / | box | point | box | box_div | divide box by point (scale) pg_catalog | / | circle | point | circle | circle_div_pt | divide pg_catalog | / | double precision | double precision | double precision | float8div | divide pg_catalog | / | double precision | real | double precision | float84div | divide pg_catalog | / | integer | bigint | bigint | int48div | divide pg_catalog | / | integer | integer | integer | int4div | divide pg_catalog | / | integer | smallint | integer | int42div | divide pg_catalog | / | interval | double precision | interval | interval_div | divide pg_catalog | / | money | bigint | money | cash_div_int8 | divide pg_catalog | / | money | double precision | money | cash_div_flt8 | divide pg_catalog | / | money | integer | money | cash_div_int4 | divide pg_catalog | / | money | money | double precision | cash_div_cash | divide pg_catalog | / | money | real | money | cash_div_flt4 | divide pg_catalog | / | money | smallint | money | cash_div_int2 | divide pg_catalog | / | numeric | numeric | numeric | numeric_div | divide pg_catalog | / | path | point | path | path_div_pt | divide (rotate/scale path) pg_catalog | / | point | point | point | point_div | divide points (scale/rotate) pg_catalog | / | real | double precision | double precision | float48div | divide pg_catalog | / | real | real | real | float4div | divide pg_catalog | / | smallint | bigint | bigint | int28div | divide pg_catalog | / | smallint | integer | integer | int24div | divide pg_catalog | / | smallint | smallint | smallint | int2div | divide (25 rows) 显示转换 int 转成 numeric或者float8后再除。 例子 postgres# select 1/2; ?column? ---------- 0 (1 row) 显示转换任意操作数postgres# select 1/2.0; ?column? ---------- 0.5 (1 row) postgres# select 1/2::float8; ?column? ---------- 0.5 (1 row) postgres# select 1/2::numeric; ?column? ------------------------ 0.50000000000000000000 (1 row) 本篇文章如有帮助到您请给「翎野君」点个赞感谢您的支持。 首发链接 https://www.cnblogs.com/lingyejun/p/17678380.html
http://www.hkea.cn/news/14503554/

相关文章:

  • 国内优秀网站案例python网站开发 pdf
  • 核工业西南建设集团有限公司网站网页设计心得体会600字
  • 网站后台如何管理顺的网站建设精英
  • 网站设计优点软件开发工具免费下载
  • wap手机网站静态模板哪个网站可以接活做
  • 揭阳企业建站服务公司网站建设客户常见问题集锦
  • 网站建设一般花多少费用中国建设银行下载官方网站
  • 大宗商品价格查询网站济宁建设网站首页
  • 搜寻的网站有哪些头像模板在线制作软件
  • 中企动力做网站价格彩票网站怎么建设
  • 南沙区做网站公司网站标签优化
  • 上门做指甲哪个网站做网站挣钱的人
  • 泰坦科技网站建设有私人做网站的吗
  • wordpress全站固定链接网站建设标志头像图片
  • 企业移动网站建设商做影评的网站模版
  • 导购 网站模板会员管理网站建设
  • 做自己的网站好还是博客好wordpress 知道创宇
  • wordpress 用户名湖南seo优化推荐
  • 福建省网站建设方案书wordpress评论开启
  • 返利网站建设wordpress小说站
  • 什么网站可以做线上小游戏重庆观音桥好吃街
  • led灯 东莞网站建设wordpress后台加统计代码
  • 中国建设银行培训网站php网站开发防注入
  • 实时网站推广的最终目的是我的世界大盒子怎么做视频网站
  • 花卉网站建设推广2w网站建设发展环境
  • 网站建设添加资料如何在百度上发表文章
  • 南通建公司网站建筑网课学习观后感
  • 网站推广什么意思重庆哪里有做淘宝网站推广的
  • 有关网站建设的书新浪舆情通
  • 做搜狗pc网站软件做网站一年的维护费用是多少