Results 1 to 8 of 8
  1. #1
    Join Date
    Jun 2010
    Posts
    4

    Unanswered: Having some trouble with Create Table

    It tells me something is wrong with my syntax, but oh so helpfully doesn't tell me what is wrong.

    CREATE TABLE 'Friends'
    (Name TINYTEXT,
    Phone CHAR(10))

  2. #2
    Join Date
    Nov 2003
    Posts
    2,935
    Provided Answers: 12
    Remove the single quotes around Friends:
    Code:
    CREATE TABLE friends
    (
      name tinytext,
      phone char(10)
    );
    It also might be that "name" is a reserved word, so you want to check that in the manual

  3. #3
    Join Date
    Jun 2010
    Posts
    4
    I added code to auto-error if it detects any reserved keywords or spaces in names, it didnt find any.
    I removed the single quotes

    I think that did it.

    EDIT: I forgot to thank you, thank you by the way.
    I am now 2 steps farther into MySQL than I got with MS's BS (couldn't even connect to it)

  4. #4
    Join Date
    Jun 2008
    Location
    pakistan
    Posts
    109
    but why you want tiny text get varchar data type

  5. #5
    Join Date
    Jun 2010
    Posts
    4
    Just testing/learning

  6. #6
    Join Date
    Jun 2010
    Posts
    2

    Other options

    Why don't you try using NaviCat or other MySQL visual interface.

  7. #7
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by svetco View Post
    Why don't you try using NaviCat or other MySQL visual interface.
    why?

    because learning SQL is better, that's why

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  8. #8
    Join Date
    Jun 2010
    Posts
    4
    Quote Originally Posted by r937 View Post
    why?

    because learning SQL is better, that's why

    Exactly. I'm trying to get a job for this.

Posting Permissions

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