Sunday, January 27, 2008

mysql> show create table 'tablename'

mysql> show create table 'tablename' -- is good query (atleast for me) to know about table and which storage engine/charset it uses (InnoDB or MyISAM).

mysql> show create table task
-> ;
+-------+--------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-------------------------+
| Table | Create Table



|
+-------+--------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-------------------------+
| task | CREATE TABLE `task` (
`id` int(11) NOT NULL auto_increment,
`title` varchar(40) default NULL,
`description` varchar(100) default NULL,
`tasktype` int(10) default NULL,
`startdatetime` datetime default NULL,
`enddatetime` datetime default NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=latin1 |
+-------+--------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-----------------------------------------------------------
-------------------------+
1 row in set (0.00 sec)





I have started using SQuirreL SQL client which is an universal client supporting many database systems like db2, oracle, mysql, sybase, and more..
Give it a try: http://squirrel-sql.sourceforge.net/

No comments: