I want to retrieve table records from tables table here below is what i explained clearly i hope u understand
This is what I have tried but I am not getting the results I expect.
Table 1
----------------------------------------------------------------------------
tables | id
----------------------------------------------------------------------------
test 1
pure 2
root 3
link 4
----------------------------------------------------------------------------
Test table
----------------------------------------------------------------------------
id | name | gender
----------------------------------------------------------------------------
1 jack m
2 dude m
3 crop m
4 pert m
----------------------------------------------------------------------------
My query to retrieve test table using table
select * from(select tables from table1 where id=1) as info;
The result
----------------------------------------------------------------------------
tables
----------------------------------------------------------------------------
test
----------------------------------------------------------------------------
Expected output
----------------------------------------------------------------------------
id | name | gender
----------------------------------------------------------------------------
1 jack m
2 dude m
3 crop m
4 pert m
----------------------------------------------------------------------------