SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    why wont a simple table be created?

    Hi.
    I dont know why but whenever I try to make a table with a text field wether its through PhpmyAdmin or I write a script it doesnt work.Here is the code:

    Code:
    CREATE TABLE `messages` (msg TEXT( 50 ) NOT NULL)
    as you can see it has only one field but it still doesnt work.Error:

    You have an error in your SQL syntax near '( 50 ) NOT NULL) ' at line 1
    any thoughts?

  2. #2
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,273
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    TEXT does not take a length, it's a 65K field

    perhaps you're thinking of VARCHAR(50)
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  3. #3
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This must be it then! let me try.

  4. #4
    FBI secret agent digitman's Avatar
    Join Date
    Sep 2004
    Location
    Work
    Posts
    697
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It worked.thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •