Hi Jay,

On 12/17/06, Jay Sprenkle <[EMAIL PROTECTED]> wrote:
On 12/16/06, Firman Wandayandi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Is any possible way to know if a column is UNIQUE without "PRAGMA
> index_info('<index_name>')"? Seems "PRAGMA table_info('<table_name>')"
> doesn't returns the unique flag of column.
>
> Thanks for advice.

this will show you the count of duplicated values for a column:

select mycol, count(*)
 from mytable
group by mycol


I meant, I want retrieve the information of the column or schema as
much as possible, so I can build a new schema based on it. Then I need
to know if column is a UNIQUE or not and so on. Such as:

mycol INTEGER NOT NULL UNIQUE

There is another idea, that is parse the "sql" column from
"sqlite_master" table. But I'm searching for a right solution.
--
Firman Wandayandi <http://firmanw.org/>

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to