From: Evgeniy Kobzev <evgenik@diamonds.ru>
To: community@altlinux.ru
Subject: Re: [Comm] Производительность SQLite!
Date: Tue, 30 Nov 2004 13:08:09 +0300
Message-ID: <41AC4689.9080208@diamonds.ru> (raw)
In-Reply-To: <41AC1FBA.3040701@diyaorg.dp.ua>
Roman Savochenko пишет:
> В дополнении к вопросу производительности возникло ещё парочка:
> - Как получить, просто, список колонок в таблице?
> В MySQL это делается запросом типа <SELECT * FROM "tbl1" WHERE 0>
В MySQL в ответ на такой запрос получим:
mysql> select * from contacts where 0;
Empty set (0.00 sec)
Видимо имелось ввиду
SHOW FIELDS FROM contacts;
А в SQLite это скорее всего
sqlite> .schema
или
sqlite> PRAGMA table_info(test2);
cid name type notnull dflt_value pk
---------- ---------- ---------- ---------- ---------- ----------
0 name TEXT 0 1
1 num DOUBLE 0 0
2 TABLE TEXT 0 0
> - Есть имена колонок на которые SQLite ругается. Например на запрос:
> CREATE TABLE "test2" ("name" TEXT PRIMARY KEY, "num" DOUBLE, "TABLE" TEXT);
> Ругается: <Request error: near "TABLE": syntax error>.
Неправда.
sqlite> .schema test2
CREATE TABLE "test2" ("name" TEXT PRIMARY KEY, "num" DOUBLE, "TABLE" TEXT);
Как видите - всё создалось.
Просто помните про, 'TABLE', "TABLE" и [TABLE]
Почитайте про ключевые слова.
> По мне, так это недопустимо!
> Да и в MySQL такого безобразия нет.
next prev parent reply other threads:[~2004-11-30 10:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-11-29 17:13 Roman Savochenko
2004-11-29 21:18 ` Alexey Rusakov
2004-11-30 7:22 ` Roman Savochenko
2004-11-30 10:08 ` Evgeniy Kobzev [this message]
2004-11-30 16:08 ` Roman Savochenko
2004-11-30 16:46 ` Roman Savochenko
2004-12-01 10:05 ` Roman Savochenko
2004-12-01 10:30 ` Evgeniy Kobzev
2004-12-02 14:19 ` Денис Смирнов
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=41AC4689.9080208@diamonds.ru \
--to=evgenik@diamonds.ru \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git