Page 1 of 1

Is it possible to obtain the NAME of each column you create

Posted: Fri Nov 28, 2014 7:09 pm
by PHPHelpNeeded
Hi,

I know query is good to retrieve, update, insert, and remove things from the table.

(For instance I found a like with the MySQL command list but I didn't find the following functions in my questions).

Question#1: but is it possible with a MySQL query to retrieve the names of the columns you created for a table?

for instance, I want to build a driver program that will test the integrity of table I create in the database.

Question#2: once you create a table, and it has values in it, can you add more columns to it, to expand the table?

My server program will need to update tables in that manner, wondering if it is possible.

Thanks.

Re: Is it possible to obtain the NAME of each column you cre

Posted: Fri Nov 28, 2014 7:34 pm
by Celauran
PHPHelpNeeded wrote:Question#1: but is it possible with a MySQL query to retrieve the names of the columns you created for a table?
SHOW COLUMNS
PHPHelpNeeded wrote:Question#2: once you create a table, and it has values in it, can you add more columns to it, to expand the table?
ALTER TABLE