Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To See the CREATE TABLE Statement of an Existing Table
How To See the CREATE TABLE Statement of an Existing Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements
✍: FYIcenter.com
If you want to know how an existing table was created, you can use the "SHOW CREATE TABLE" command to get a copy of the "CREATE TABLE" statement back on an existing table. The following tutorial script shows you a good example:
mysql> SHOW CREATE TABLE tip; +-------+------------------------------- | Table | Create Table +-------+------------------------------- | tip | CREATE TABLE `tip` ( `id` int(11) NOT NULL, `subject` varchar(80) NOT NULL, `description` varchar(256) NOT NULL, `create_date` date default NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 | +-------+------------------------------- 1 row in set (0.38 sec)
Comparing with the original "CREATE TABLE" statement used in the previous tutorial, the output tells you that:
2007-05-11, 4641👍, 0💬
Popular Posts:
Once I have developed the COM wrapper do I have to still register the COM in registry? Yes.
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
Can you explain why your project needed XML? Remember XML was meant to exchange data between two ent...
What is the purpose of Replication ? Replication is way of keeping data synchronized in multiple dat...
Assuming that the structure of a table shows two columns like this: --------+------------+-- ----+---...