On 10/1/08, Roy Lyseng <[EMAIL PROTECTED]> wrote:
>
> This is in accordance with the SQL standard. I think the reasoning is that
> you should be able to split long text strings onto multiple lines, so any
> sequence of quoted strings is concatenated into a single string literal.
> Notice that there must be a <separator> (ie a space or a newline) between
> the strings.


Makes sense, but it should be documented *somewhere* as an implicit concat.

The latter query (SELECT without a FROM) is a MySQL extension.


That wasn't the point of Brian using "select 'foo' 'bar';" as an example --
the point I believe Brian was trying to make was that "select 'foo' 'bar';"
acts like "select CONCAT('foo','bar');"

Which is explained by the SQL standard.....

-Sheeri

Roy
>
> Another reason for not
>
> Brian Moon wrote:
>
>> This example says it all.  The folks in #mysql-dev (ok, one guy) seemed to
>> think this was expected.  This apparently stems from another interesting
>> query at the end of the example.  I can't find this to be a standard of any
>> kind and frankly find it to be wrong.  Due to an error in my application
>>  while building the query (no , was inserted) I was getting bad data.  I
>> tried sqlite and pgsql.  They either gave a different, non-error message
>> (sqlite) or gave an error (pgsql).  Wanna fix this in Drizzle?
>>
>> mysql> use information_schema;
>> Database changed
>>
>> mysql> select table_name from tables where
>>       table_schema in ('mysql' 'test');
>> Empty set (0.10 sec)
>>
>> mysql> select table_name from tables where
>>       table_schema in ('mysql', 'test');
>> +---------------------------+
>> | table_name                |
>> +---------------------------+
>> | columns_priv              |
>> | db                        |
>> | func                      |
>> | help_category             |
>> | help_keyword              |
>> | help_relation             |
>> | help_topic                |
>> | host                      |
>> | proc                      |
>> | procs_priv                |
>> | tables_priv               |
>> | time_zone                 |
>> | time_zone_leap_second     |
>> | time_zone_name            |
>> | time_zone_transition      |
>> | time_zone_transition_type |
>> | user                      |
>> | user_info                 |
>> | comments                  |
>> | deal_queue                |
>> | users                     |
>> +---------------------------+
>> 21 rows in set (0.17 sec)
>>
>> mysql> select 'foo' 'bar';
>> +--------+
>> | foo    |
>> +--------+
>> | foobar |
>> +--------+
>> 1 row in set (0.00 sec)
>>
>>
>>
> _______________________________________________
> Mailing list: 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> Post to     : [email protected]
> Unsubscribe : 
> https://launchpad.net/~drizzle-discuss<https://launchpad.net/%7Edrizzle-discuss>
> More help   : https://help.launchpad.net/ListHelp
>



-- 
- Sheeri K. Cabral

Note:  Currently I work for The Pythian Group (http://www.pythian.com/ ), a
remote DBA firm, and consulting would constitute a conflict of
interest.  However, I do recommend our work, and if you're looking for DBA
work (I do MySQL work, but they have great Oracle and SQL Server DBAs too)
right now, whether you need a few hours a week, or someone fulltime while
you continue a job search.

I have a webpage with tips on how to find a DBA:
http://sheeri.net/how-to-find-a-dba/
I can recommend http://www.toomanyconnections.com as a good site to find
MySQL (and Oracle) DBAs.
If you're looking for web design, I recommend the small business my husband
works for, http://www.digital-loom.com
I regret that I have no other information for any other type of position,
including developer, programmer and systems administrator.
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help   : https://help.launchpad.net/ListHelp

Reply via email to