From: Roman Savochenko <rom_as@diyaorg.dp.ua>
To: community@altlinux.ru
Subject: Re: [Comm] Производительность SQLite!
Date: Wed, 01 Dec 2004 12:05:39 +0200
Message-ID: <41AD9773.1070007@diyaorg.dp.ua> (raw)
In-Reply-To: <41AC4689.9080208@diamonds.ru>
Evgeniy Kobzev wrote:
> 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]
> Почитайте про ключевые слова.
Евгений, ещё один вопрос можно? :)
Очередное подозрение на грабли в C-API.
Почему если запрашивать <SELECT name FROM "test00" WHERE "name"='Sh2';>
получаю имена колонок: <name>
А если <SELECT "name" FROM "test00" WHERE "name"='Sh2';>
то имена колонок: <"name">;
Подозрительная неоднозначность!
С уважением Роман!
next prev parent reply other threads:[~2004-12-01 10:05 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
2004-11-30 16:08 ` Roman Savochenko
2004-11-30 16:46 ` Roman Savochenko
2004-12-01 10:05 ` Roman Savochenko [this message]
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=41AD9773.1070007@diyaorg.dp.ua \
--to=rom_as@diyaorg.dp.ua \
--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