Black, Michael (IS) wrote:
> Good pointso probably time equivalent either way. Though table_info will
> allow the feature creep of "does a column exist"
> pretty easily.
So would preparing a statement of the form "select ColumnToCheck from
TableToCheck;"
--
Igor
Operating Unit
Northrop Grumman Information Systems
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on
behalf of Igor Tandetnik [itandet...@mvps.org]
Sent: Friday, July 20, 2012 7:59 AM
To: sqlite-users@sqlite.org
Subject: EXT :Re: [sqlite
Black, Michael (IS) wrote:
> table_info() will be faster than doing "select *" I would think in most all
> cases.
To check the existence of a table, you don't need to actually run the select
statement - just prepare it and check for errors.
--
Igor Tandetnik
I needed a quick excercise this morning. Never used table_info() before.
table_info() will be faster than doing "select *" I would think in most all
cases.
#include
#include
#include
#include "sqlite3.h"
using namespace std;
bool dbExists(string dbName) {
sqlite3 *db;
int rc =
On 20 Jul 2012, at 11:51am, Arbol One wrote:
> Is there a way to find out if a certain database AND table already exist?
>
> In my C++ program I would like to query SQLite3 to find out if a database
> already exists and also if a particular table exists in that database. Is
Darn. I didn't mean to quote the table name: (though double quotes or
brackets are alllowed). Sorry for the noise.
SELECT 'anything' FROM MyTableInQuestion LIMIT 0;
___
sqlite-users mailing list
sqlite-users@sqlite.org
On Fri, Jul 20, 2012 at 6:51 AM, Arbol One wrote:
> Is there a way to find out if a certain database AND table already exist?
>
> I am using std i/o methods to check for the existing SQLite3 file
> containing the database,
==> I think that's the standard method.
but I
7 matches
Mail list logo