Re: SELECT or SHOW full table name?

2004-11-04 Thread Gleb Paharenko
Hi.



  select concat(database(),_utf8".",_utf8'table')

  

works fine. It is not clear for me - what is the problem? You can choose charset  
according to your local settings.

 



Nick Arnett <[EMAIL PROTECTED]> wrote:

> I don't see a way to ask MySQL what the "full" name of a table is... the 

> equivalent of this:

> 

> SELECT CONCAT(DATABASE(), ".", "table_name")

> 

> which would return something like this (assuming the current database is 

> called "my_database":

> 

> my_database.table_name

> 

> The reason I want this is to ensure that a scripted operation isn't 

> treating the same table as if it were two different tables.  I have a 

> method that moves records among tables by copying and then deleting.  If 

> the two tables are really the same table, it'll lose the records, since 

> it will have copied them to the same table, then delete them.

> 

> I can do it the way above, but I'm thinking there might be a better way...

> 

> Thanks!

> 

> Nick

> 

> 



-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
This email is sponsored by Ensita.NET http://www.ensita.net/
   __  ___ ___   __
  /  |/  /_ __/ __/ __ \/ /Gleb Paharenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.NET
   <___/   www.mysql.com




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



SELECT or SHOW full table name?

2004-11-03 Thread Nick Arnett
I don't see a way to ask MySQL what the "full" name of a table is... the 
equivalent of this:

SELECT CONCAT(DATABASE(), ".", "table_name")
which would return something like this (assuming the current database is 
called "my_database":

my_database.table_name
The reason I want this is to ensure that a scripted operation isn't 
treating the same table as if it were two different tables.  I have a 
method that moves records among tables by copying and then deleting.  If 
the two tables are really the same table, it'll lose the records, since 
it will have copied them to the same table, then delete them.

I can do it the way above, but I'm thinking there might be a better way...
Thanks!
Nick
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]