|
|
Subject:
Need a MySQL 'create table' string
Category: Computers > Programming Asked by: rservice-ga List Price: $20.00 |
Posted:
07 Dec 2005 13:16 PST
Expires: 06 Jan 2006 13:16 PST Question ID: 602788 |
I need a MySQL query to create a table with the following columns (character count should be 50 unless otherwise indicated in parentheses): PodcastName Category Province (2) Website Email Description Keywords City DateAdded Rating (1) --- will be a number between 1 and 5 XML-URL ProducerName HostName |
|
Subject:
Re: Need a MySQL 'create table' string
Answered By: lotd-ga on 07 Dec 2005 13:37 PST Rated: |
Hi rservice, Please find the create table statement below. Replace "Tablename" with your preferred name for the table. CREATE TABLE Tablename ( PodcastName varchar(50), Category varchar(50), Province varchar(2), Website varchar(50), Email varchar(50), Description varchar(50), Keywords varchar(50), City varchar(50), DateAdded varchar(50), Rating tinyint, XML-URL varchar(50), ProducerName varchar(50), HostName varchar(50) ); If you require any further clarification, please do not hesitate to ask. Regards, lotd | |
| |
| |
|
rservice-ga rated this answer: |
|
Subject:
Re: Need a MySQL 'create table' string
From: bridgetsbuddy-ga on 07 Dec 2005 13:49 PST |
May I humbly suggest that an optional definition of the table is as follows: CREATE TABLE podcast ( podcast_id int(11) unsigned NOT NULL auto_increment, podcast_name varchar(50) NOT NULL default '', category varchar(50) NOT NULL default '', province char(2) NOT NULL default '', website varchar(50) NOT NULL default '', email varchar(50) NOT NULL default '', description varchar(50) NOT NULL default '', keywords varchar(50) NOT NULL default '', city varchar(50) NOT NULL default '', date_added date NOT NULL default '0000-00-00', rating tinyint(1) unsigned NOT NULL default 0, xml_url varchar(50) NOT NULL default '', producer_name varchar(50) NOT NULL default '', host_name varchar(50) NOT NULL default '', PRIMARY KEY (podcast_id) ); and that with more detail some relationships can be built out; May I also suggest that having a default size of 50 for strings is not the most efficient use of space; |
Subject:
Re: Need a MySQL 'create table' string
From: aristoi-ga on 07 Dec 2005 13:53 PST |
rservice-ga, you can fix the error by changing that dash to an underscore in XML-URL. |
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 |