How To Create a New Table

Q

How To Create a New Table? - MySQL FAQs - Understanding SQL CREATE, ALTER and DROP Statements

✍: FYIcenter.com

A

If you want to create a new table, you can use the "CREATE TABLE" statement. The following tutorial script shows you how to create a table called "tip":

mysql> CREATE TABLE tip (id INTEGER PRIMARY KEY,
   subject VARCHAR(80) NOT NULL,
   description VARCHAR(256) NOT NULL,
   create_date DATE NULL);
   
Query OK, 0 rows affected (0.08 sec)

This scripts creates a testing table called "tip" with 4 columns in the current database.

2007-05-11, 4776👍, 0💬