Ismail Gunes
Ismail Gunes

Reputation: 558

How to get some extra info description of a mysql table

I found in stackoverflow a link who explains this question. I wrote a procedure who does that but the retreived data is not as it's expected by mysql

Here is data that I receive using procedure (this gives an error when I use it for creating a table in this form, the error is syntax error near id int(11))

CREATE TABLE IF NOT EXISTS `atelier`( 
`id`  int(11) NO PRI  auto_increment
`nom`  varchar(30) NO UNI  
`at_date`  date NO   
`pax`  int(11) NO   
`prix`  double NO   
`vente`  double YES   
`note`  varchar(200) YES   
`cr_user`  varchar(15) NO   
`cr_date`  datetime NO   
`up_user`  varchar(15) YES   
`up_date`  datetime YES   

And here is the data given by phpmyadmin

CREATE TABLE `Atelier` (
`id` int(11) NOT NULL auto_increment,
`nom` varchar(30) NOT NULL,
`date` date NOT NULL,
`pax` int(11) NOT NULL,
`prix` double NOT NULL,
`vente` double default NULL,
`note` varchar(200) default NULL,
`cr_user` varchar(15) NOT NULL,
`cr_date` datetime NOT NULL,
`up_user` varchar(15) default NULL,
`up_date` datetime default NULL,
PRIMARY KEY  (`id`)
) ENGINE=Innodb DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

What I want to know should I do translation of YES AND NO within my program or there is a way to obtain it with a query, and with wich query I can obtain info of two last lines given by phpmyadmin.(I think they are usefull for the choose of ENGINE and define the unique and primary keys)

PS:Using c#, and names of the tables I get from another procedure that exist in my program. I don't get it with DESCRIBE. What I receive is between id and up_date.

Here is the link of my procedures MY PROCEDURES

Upvotes: 0

Views: 109

Answers (1)

CodeCaster
CodeCaster

Reputation: 151644

You didn't show the procedure generating this output, but if you replace DESCRIBE in there with SHOW CREATE TABLE I suppose it will work.

Upvotes: 1

Related Questions