Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create Table Question

Status
Not open for further replies.

james0816

Programmer
Jan 9, 2003
295
US
I am creating a table (table D in the list below) via select statement from another table (table B from the list below). It creates just fine. My question is ... when i go in using the MySQL Control Center to see the tables I get the following information:

table size(bytes) type
A 26 MyISAM
B 66 MyISAM
C 0 MyISAM
D 3276 InnoDB
E 0 MyISAM

table D only has 5 records in it.

so my questions are.....

Why is my table over 3MB in size with only five records (just data)
and
What is InnoDB and do I need to define this when I create my table?

Using MySQL 4.1.12a by the way.

thx
 
so....when creating a table via a "select" statement....can you define the type?

I can do this normally by such:

create table testtbl (yr varchar(4)) type=myisam

however if i do:

create table testtbl as (select yr from tbl1) type=myisam

i get an error.
 
If you move the "type=myisam" to before the "as", that should work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top