开发者

Ansi SQL type casting

开发者 https://www.devze.com 2022-12-08 01:50 出处:网络
Is it allowed to cast types in ANSI SQL like in postgres fo开发者_开发百科r example: SELECT SUM( CAST(qnty AS int) - CAST(reserve AS int) )AS sum

Is it allowed to cast types in ANSI SQL like in postgres fo开发者_开发百科r example:

SELECT SUM( CAST(qnty AS int) - CAST(reserve AS int) )  AS sum
...

qnty and reserve are character columns.


The CAST expression was added in SQL-92. You can see it for example in this draft.

0

精彩评论

暂无评论...
验证码 换一张
取 消