パスワードを忘れた? アカウント作成
590003 journal

dsegの日記: メモ: SQLiteにCURRENT_TIMESTAMPがない?

日記 by dseg

以下、メモ。お目汚し失礼。

dseg@mantra ~$ mysql -u dseg
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 692 to server version: 4.0.21

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> select CURRENT_TIMESTAMP;
+---------------------+
| CURRENT_TIMESTAMP |
+---------------------+
| 2004-12-13 06:43:22 |
+---------------------+
1 row in set (0.02 sec)

dseg@mantra ~$ sqlite
Loading resources from /home/users/dseg/.sqliterc
SQLite version 2.8.15
Enter ".help" for instructions
sqlite> select CURRENT_TIMESTAMP;
SQL error: no such column: CURRENT_TIMESTAMP

CURRENT_TIMESTAMPはSQLite3のCVSで実装されているようだ。
v2.8系では代替策として 「select datetime('now')」を使う。

sqlite> SELECT datetime('now');
2004-12-13 06:42:47

関連情報:
sqlite - Date And Time Functions
Ticket 251: ORDER BY doesn't work on TIMESTAMP column type

この議論は賞味期限が切れたので、アーカイブ化されています。 新たにコメントを付けることはできません。
typodupeerror

アレゲは一日にしてならず -- アレゲ研究家

読み込み中...