Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: [MySql] dumping table structure

by trammell (Priest)
on Aug 05, 2005 at 21:00 UTC ( [id://481369]=note: print w/replies, xml ) Need Help??


in reply to [MySql] dumping table structure

In the interests of completeness:
% echo "show create table mytable" | mysql -r mydb
I prefer the "create table" syntax because table index information is complete, unlike the output of DESCRIBE table.

Replies are listed 'Best First'.
Re^2: [MySql] dumping table structure
by thor (Priest) on Aug 05, 2005 at 21:11 UTC
    I know nothing of MySQL, but do indicies have to be created at table create time? In other database engines, you can create them whenever. If that's the case in MySQL, will your command necessarily show the indicies? Just curious...

    thor

    Feel the white light, the light within
    Be your own disciple, fan the sparks of will
    For all of us waiting, your kingdom will come

      "I know nothing of MySQL, but do indicies have to be created at table create time?"

      No, you can add them with the ALTER TABLE syntax. See the MYSQL docs at ALTER Table syntax

      lupey

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://481369]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2024-04-24 21:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found