If I use the below code:
SELECT
(player.id, player.firstname, player.lastname) AS player,
FROM
player
I get this result:
----------------
| player |
----------------
| (1,Bob,Smith) |
----------------
| (2,John,Smith) |
----------------
I like it!
But I wanna use player.*
instead of indicating each field.
I tried with:
SELECT
(player.*) AS player,
FROM
player
but the result is not like before: there are columns like:
---- ----------- ----------
| id | firstname | lastname |
---- ----------- ----------
| 1 | Bob | Smith |
---- ----------- ----------
| 2 | John | Smith |
---- ----------- ----------
Why? Is there a way to get a tuple with all the columns using player.*
?
CodePudding user response:
Use the table reference:
select player
from player;