|
|
Subject:
Quick help with MySQL 'create table' command
Category: Computers > Programming Asked by: jhabley-ga List Price: $2.00 |
Posted:
21 Dec 2003 12:43 PST
Expires: 20 Jan 2004 12:43 PST Question ID: 289305 |
I'm trying to create a table called review_main with the following fields: primary key (I guess? do I need one?) company_name (40 chars) city (40 chars) rating (40 chars) phone (12 chars) review_text (need lots of room for this) Could you please provide the MySQL query I need to execute this? |
|
Subject:
Re: Quick help with MySQL 'create table' command
Answered By: googleexpert-ga on 21 Dec 2003 13:05 PST Rated: |
If there will be multiple ratings for each company, Here is the SQL statement to create such review_main: CREATE TABLE review_main ( company_name VARCHAR(40) NOT NULL, city VARCHAR(40) NOT NULL, rating VARCHAR(40) NOT NULL, phone VARCHAR(12) NOT NULL, review_text MEDIUMTEXT NOT NULL, PRIMARY KEY (company_name,rating) ); Note: TEXT provides a maximum of 64KB space MEDIUMTEXT provides a maximum of 16MB space Please let me know if you have anymore questions. Thank you. -googleexpert |
jhabley-ga
rated this answer:
Worked like a charm. Thanks! |
|
There are no comments at this time. |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |