View Single Post
Old 2003-08-31, 04:17 PM   #6
nickk
Internet! Is that thing still around?
 
Join Date: Aug 2003
Posts: 2
doh, thought you said how to create a table,
to create a db just type 'CREATE DATABASE [dbname]' once you logged into mysql.

to create a table:

you have to login to mysql first:
mysql -u [username] -p
it'll ask your for your pass
then, type: use [databasename];

then something of this sort to create the database:
CREATE TABLE [table name]
(
ID INT AUTO_INCREMENT,
name VARCHAR(35) NOT NULL,
name2 int,
name3 date,
name4 text,

PRIMARY KEY (ID)
);

where name,name2... are variables of your choice, and int,date,varchar,text are variable types.

Last edited by nickk; 2003-08-31 at 04:35 PM..
nickk is offline   Reply With Quote