SQLite中的表达式

SQLite中的表达式

SELECT的基本完整形式中,我们会看到几乎是所有的子句都会使用到表达式。以下是SQLite支持的表达式类型。

expr binary-op expr |                                                                                                                //二元运算符

expr [NOT] like-op expr [ESCAPE expr] |                                                                    //LIKE运算符,匹配模式的一种

unary-op expr |                                                                                                                 //一元运算符

( expr ) |                                                                                                                             //括号

column-name |                                                                                                                          //列名

table-name . column-name |                                                                                        //表名.列名

database-name . table-name . column-name |                                                                  //数据库名.表名.列名

literal-value |                                                                                                                     //字面量

parameter |                                                                                                                       //差数形式

function-name ( expr-list | * ) |                                                                                       //函数

expr ISNULL |                                                                                                                   //处理NULL

expr NOTNULL |                                                                                                              //非空

expr [NOT] BETWEEN expr AND expr |                                                                      //范围

expr [NOT] IN ( value-list ) |                                                                                            //范围

expr [NOT] IN ( select-statement ) |                                                                              //范围

expr [NOT] IN [database-name .] table-name |                                                          //范围

[EXISTS] ( select-statement ) |                                                                                       //存在

CASE [expr] ( WHEN expr THEN expr )+ [ELSE expr] END |                                  //条件结果

CAST ( expr AS type )                                                                                                     //转换

本节将讲解这些表达式中最为常用的几种,如运算符、NULL的运算、参数形式、匹配模式、内建函数、条件结果等内容。

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29597077/viewspace-2154266/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29597077/viewspace-2154266/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值