On 2014/09/25 05:04, 麦田观望者 wrote:
Hi, RSmith‍:
I can't find a method to reply you message,so i send it to you mailbox 
directly, sorry for disturber.

you say:
>It is just whatever the Query producer feels comfortable writing in the
>header to identify the column‍

maybe you are right on the point of STANDARD‍, but, every serious(normal?) 
programer except the db engine generate the same column name as they defined in 
the database except when the name conflict occured.

index is a number which is inconstant‍  --  table redesign, sql statement 
re-write. but name keep more stable and is more friendly to people.  you can 
find a lot of FieldByName(...) statement in a database related source 
code--even some company require their programer access field only by field name 
-- except a performance issue is occured..

Pardon the next bit of convoluted English, I think the OP works via a 
translator so I will try to be overly verbose to try and
ensure the message go through in its fullest meaning.

Hi Mykore,

FieldByName(...) refers to the fieldname returned by the query or table, if you 
do not tell the query what exact fieldname you mean
for it to show, then it may show some other name. I am not talking about what is 
"Standard" acceptable use, I talk about "THE SQL
Standard", as in what the people who designed SQL language constructs meant and 
require from a DB engine. You only think it is
standard use to get the names in a query when you don't ask for it because most 
DB's do that most of the time, but it is in fact not
required, you HAVE to say specifically what you want as a field name (using the 
AS directive) if you want to be guaranteed that a
certain query will produce certain field names.

This is not my opinion, it's the SQL law - even if it seems silly and you can 
come up with hundred reasons why it is silly, it still
is the law and it won't change. If you expect a name, ask for it specifically.


i whish you report my opinion to the sqlite dev team, or post it to public and 
collect more opinions.

No problem - I have posted this to the forum  :)



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to