MySQL Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsDatabasesMySQL Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 8th, 2004, 01:35 PM
PhoenixTear PhoenixTear is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2004
Posts: 3 PhoenixTear User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via AIM to PhoenixTear
"ERROR 1113: A table must have at least 1 column"

Hi all,

Here's the problem of mine,
I'll create or open a db alright,
then I go to create a table, and here's what I get:

Quote:
Originally Posted by PT
mysql> CREATE TABLE (table name)
ERROR 1113: A table must have at least 1 column


I need help with:

Creating columns.

What all this NOT NULL etc, stuff is.

And what is VARCHAR?

Thanks in advance,
PT

Reply With Quote
  #2  
Old July 8th, 2004, 04:22 PM
lnxgeek lnxgeek is offline
I AM A GOLDEN GOD
Dev Shed God 1st Plane (5500 - 5999 posts)
 
Join Date: Apr 2003
Location: Camarillo, California
Posts: 5,932 lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level)lnxgeek User rank is General 3rd Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 1 Week 3 Days 16 h 44 m 38 sec
Reputation Power: 1165
Everything is outlined in the MySQL manual, specifically the sections 'MySQL Tutorial', 'Creating a table', and 'Column Types'.

Reply With Quote
  #3  
Old November 30th, 2012, 06:44 PM
patrickpff patrickpff is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2012
Posts: 1 patrickpff User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 m 32 sec
Reputation Power: 0
...

Hey man,

first, and most important:

- VARCHAR as INT or CHAR are "datatypes", or types of variables...
- VARCHAR is the type normaly used to get strings
- NOT NULL indicates the restriction (if you'll can leave this table field empty - with a null value)

ok, the other important thing you will need know is about the Primary Key
this table field will identify each row of your table
this will need a unique value (each row will have a unique key)
this is important becouse is this the column that will identify specific data in your table

well, one example may be this way:

CREATE TABLE student (
code_stdt INTEGER not null,
name_stdt VARCHAR(70) not null,
nota_stdt FLOAT,
PRIMARY KEY (code_stdt)
)



> I hope to have helped...

Reply With Quote
  #4  
Old November 30th, 2012, 08:04 PM
r937's Avatar
r937 r937 is online now
SQL Consultant
Click here for more information.
 
Join Date: Feb 2003
Location: Toronto Canada
Posts: 26,377 r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level)r937 User rank is General 47th Grade (Above 100000 Reputation Level) 
Time spent in forums: 3 Months 1 Week 2 Days 7 h 40 m 19 sec
Reputation Power: 4140
Quote:
Originally Posted by patrickpff
> I hope to have helped...
nice one, but i really doubt the original poster has waited these eight years for your reply

__________________
r937.com | rudy.ca
please visit Simply SQL and buy my book

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesMySQL Help > "ERROR 1113: A table must have at least 1 column"

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap