Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-12 Thread Black, Michael (IS)
That's the nice thing about standards...there are so many to choose from...:-( Michael D. Black Senior Scientist Advanced Analytics Directorate Advanced GEOINT Solutions Operating Unit Northrop Grumman Information Systems ___ sqlite-users mailing l

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-12 Thread Simon Slavin
On 12 Jun 2012, at 9:52am, rick wrote: > Well, I'm not entirely a casual user, but I don't know the SQL-92 standard > or it's successors. I'm an engineer, and sqlite for me is a tool. Above > query was used a long time in a MySQL DB, where it works as (I) expected. SQL (note that I'm talking ab

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-12 Thread rick
On 11/06/2012 21:48, Larry Brasfield wrote: > On June 11, rick wrote: >> Something I noticed today: >> >> sqlite> select * FROM words WHERE word = "id"; >> >> >> sqlite> select * FROM words WHERE word = 'id'; >> 13556|id >> >> sqlite> .schema >> CREATE TABLE words ( >> id integer primary key, >>

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-11 Thread Pavel Ivanov
> You have overstated the requirements upon SQL identifiers.  Quoting via > surrounding double-quote is only necessary if the identifier would not meet > the definition of a "regular identifier", loosely understood to be a letter > followed by letter, digit or underscore characters. Also quoting i

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-11 Thread Larry Brasfield
On June 11, rick wrote: Yes, it can be explained: says: 'keyword' A keyword in single quotes is a string literal. "keyword" A keyword in double-quotes is an identifier So, "id" is interpreted as a column name, not as the string literal 'id', unless t

Re: [sqlite] Quoting "id" versus 'id' in query

2012-06-11 Thread Larry Brasfield
On June 11, rick wrote: Something I noticed today: sqlite> select * FROM words WHERE word = "id"; sqlite> select * FROM words WHERE word = 'id'; 13556|id sqlite> .schema CREATE TABLE words ( id integer primary key, word varchar(64) ); Yes, it can be explained:

[sqlite] Quoting "id" versus 'id' in query

2012-06-11 Thread rick
Something I noticed today: sqlite> select * FROM words WHERE word = "id"; sqlite> select * FROM words WHERE word = 'id'; 13556|id sqlite> .schema CREATE TABLE words ( id integer primary key, word varchar(64) ); Yes, it can be explained: says: