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, 4826👍, 0💬
Popular Posts:
How To Use SELECT Statement to Count the Number of Rows? - Oracle DBA FAQ - Understanding SQL SELECT...
How do we create DCOM object in VB6? Using the CreateObject method you can create a DCOM object. You...
How does ASP.NET maintain state in between subsequent request ? Refer caching chapter.
Write an equivalent expression for x%8? x&7
What exactly happens when ASPX page is requested from Browser? Note: - Here the interviewer is expec...