select * from tbl
Is there an easy way to list all the column names from the table that will look like this?
select colA, colB, colC from tbl
select * from tbl
Is there an easy way to list all the column names from the table that will look like this?
select colA, colB, colC from tbl
I'm completely sure what you mean by "list". To select all the columns you could do
SELECT * FROM tbl
or if you want list all of the columns and their types you can use
DESCRIBE tbl
I'm not sure what you mean by listing the column names. As already mentioned to list the data within all columns you'll need to write:
select * from table
Whereas if you'd like a list of just the columns in your table, give these a try:
show columns from table
or
describe table
More information on the latter can be found here