Acceso a una tabla con varios nombres

I have a table like tbl_example. I want to access the same table with different names like tbl_a or tbl_b. Is there any way to do so in MySQL?

adding an example Suppose I have a table tbl_A and 5 users with following userid: 1: user1 2: user2 3: user3 4: user4 5: user5

And I pick the table name dynamically for each user: tbl_ e.g: tbl_user1 In current scenario I have created 5 different tables with same data , but I do not want to redundant my db with multiple tables with same data. So is there any way to use this single table with 5 different names?

preguntado el 27 de noviembre de 13 a las 08:11

1 Respuestas

Create a view to "hide" the original table name:

CREATE VIEW view_name AS 
    SELECT * from original_table

respondido 27 nov., 13:08

Hi Juergen the thing is I do not want to share the main table name so the other user will not know that there is a table with name tbl_example. the table name shared with the other user can be anything like tbl_a or t1 - Nikk

@Nikk: You could create a Ver with the name you like. - juergen d

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.