sqlite常用sql语句
来源:互联网 发布:回文数组 编辑:程序博客网 时间:2024/05/16 09:15
--返回UTC时间
select CURRENT_TIMESTAMP;
--返回本地时间
select datetime(CURRENT_TIMESTAMP,'localtime');
--时间转换,时间转换时要求: yyyy-MM-dd,例如: 2008-08-09
SELECT datetime('2008-12-22') AS [My Time];
SELECT datetime('2008-12-22') AS "My Time";--必须为双引号
SELECT
SELECT
select CURRENT_TIME;--返回当前UTC时间
select CURRENT_DATE;--返回当前UTC日期
select julianday('2008-12-22') - julianday('2008-12-21');--日期比较
--Compute the current date.
SELECT date('now');
--Compute the last day of the current month.
SELECT date('now','start of month','+1 month','-1 day');
--Compute the date and time given a unix timestamp 1092941466.
SELECT datetime(1092941466, 'unixepoch');
--Compute the date and time given a unix timestamp 1092941466, and compensate for your local timezone.
SELECT datetime(1092941466, 'unixepoch', 'localtime');
--Compute the current unix timestamp.
SELECT strftime('%s','now');
--Compute the number of days since the signing of the US Declaration of Independent.
SELECT julianday('now') - julianday('1776-07-04');
--Compute the number of seconds since a particular moment in 2004:
SELECT strftime('%s','now') - strftime('%s','2004-01-01 02:34:56');
--Compute the date of the first Tuesday in October for the current year.
SELECT date('now','start of year','+9 months','weekday 2');
--Compute the time since the unix epoch in seconds (like strftime('%s','now') except includes fractional part):
SELECT (julianday('now') - 2440587.5)*86400.0;
Select rowid,* From keys order by rowid asc Limit 5 Offset 5 ;--SQLite分页显示,表示跳过5行,再取5行,即第二页
- sqlite常用sql语句
- SQLITE常用SQL语句
- Sqlite常用sql语句
- sqlite常用sql语句
- SQLite 常用SQL语句
- SQLite 常用语句 sql语句
- sqlite数据库常用SQL语句:
- SQL 和 Sqlite 常用语句
- sqlite中常用的sql语句
- sqlite数据库中常用的sql语句
- SQLite中常用的SQL语句
- SQLite简介、常用SQL语句、SQL使用速查
- Android数据存储之SQLite中常用的SQL语句
- sqlite常用语句
- Sqlite常用语句
- SQLite常用语句
- SQlite常用语句
- sqlite常用语句
- ubuntu安装nfs server
- hibernate查询数据表char类型字段只返回一个字符
- Linux文件权限
- 关于三大框架的学习
- 关于ActionScript 3.0对象的赋值与引用的对比
- sqlite常用sql语句
- ArrayList与LinkedList
- ARM中计算MPLL的方法
- Linux内核调整和内核参数详解
- SVN服务搭建
- 利于ThreadLocal管理Hibernate Session
- Java语法总结 - 内部类
- MSSQL数据库生成 SQL脚本
- 简单的ajax与struts2实例