Re: [sqlite] Unable to create two indexes with the same name but on different tables

2016-10-01 Thread Richard Hipp
On 9/30/16, Malte Legenhausen wrote: > Other database systems > like postgres can differ between indexes with the same name on different > tables. No it can't. Index names must be unique within a schema. Have you actually tried creating two indexes with the same name

Re: [sqlite] Unable to create two indexes with the same name but on different tables

2016-10-01 Thread Simon Slavin
On 30 Sep 2016, at 2:33pm, Malte Legenhausen wrote: > sqlite> create table t1(one varchar(10)); > sqlite> CREATE INDEX unique_one ON t1 (one); > sqlite> create table t2(one varchar(10)); > sqlite> CREATE INDEX unique_one ON t2 (one); > Error: index unique_one already

Re: [sqlite] Unable to create two indexes with the same name but on different tables

2016-10-01 Thread Paul Sanderson
Sorry what is "very hard" about SELECT * FROM sqlite_master WHERE type = 'index' AND name = 'new_index_name' to see if the index already exists Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786

[sqlite] Unable to create two indexes with the same name but on different tables

2016-10-01 Thread Malte Legenhausen
Hi, Could someone please explain why the following sequence of commands fail in sqlite? SQLite version 3.14.0 sqlite> create table t1(one varchar(10)); sqlite> CREATE INDEX unique_one ON t1 (one); sqlite> create table t2(one varchar(10)); sqlite> CREATE INDEX unique_one ON t2