List:MySQL and Java« Previous MessageNext Message »
From:Evgeniy Strokin Date:February 26 2003 1:47pm
Subject:Re: May I appeal to primary key without knowing name of it?
View as plain text  
Thanks for response. 
I just tried it, it throws:
ERROR 1054: Unknown column '_rowid' in 'where clause'
I tried it using JDBC and MySql console, result the
same.
Maybe something missing?

Please help.

Thanks,
Jenya

--- Michael Widenius <monty@stripped> wrote:
> 
> Hi!
> 
> >>>>> "Evgeniy" == Evgeniy Strokin
> <evgeniy_strokin@stripped> writes:
> 
> Evgeniy> Hi,
> Evgeniy> Is it possible to make such query and run
> it via JDBC:
> Evgeniy> Select * from tableName where primary_key =
> 123
> Evgeniy> Primary_key is not name of column. In fact
> I don> Evgeniy> know what is name of primary key. But I
> know only that
> Evgeniy> primary key should be = 123.
> Evgeniy> Another words: may I appeal to primary key
> without
> Evgeniy> knowing name of it?
> 
> You can do:
> 
> SELECT * from table_name WHERE _rowid=123
> 
> _rowid is in MySQL an alias for the primary key...
> 
> Regards,
> Monty
> 
> -- 
> MySQL 2003 Users Conference ->
> http://www.mysql.com/events/uc2003/
>    __  ___     ___ ____  __
>   /  |/  /_ __/ __/ __ \/ /    Mr. Michael Widenius
> <monty@stripped>
>  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, CTO
> /_/  /_/\_, /___/\___\_\___/   Helsinki, Finland
>        <___/   www.mysql.com
> 
> 
>
---------------------------------------------------------------------
> Before posting, please check:
>    http://www.mysql.com/doc/         (the manual)
>    http://lists.mysql.com/           (the list
> archive)
> 
> To request this thread, e-mail
> <java-thread5089@stripped>
> To unsubscribe, e-mail
>
<java-unsubscribe-evgeniy.strokin=rocketrainer.com@stripped>
> 
> 
> 
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/
Thread
May I appeal to primary key without knowing name of it? Evgeniy Strokin18 Feb
  • May I appeal to primary key without knowing name of it? Michael Widenius25 Feb
    • Re: May I appeal to primary key without knowing name of it? Evgeniy Strokin26 Feb
      • Re: May I appeal to primary key without knowing name of it? Evgeniy Strokin27 Feb