#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2012
    Posts
    1
    Rep Power
    0

    Question MySQL error message


    HI

    I'm new at MySQL and I would like to have some help with an error message that I keep getting.

    Could someone more knowledgeable then me take a look at it and tell what is going on.

    /* ----------------------------------- */

    SQL-fråga:

    CREATE TABLE `group_admins` (
    `row_id` int( 5 ) NOT NULL AUTO_INCREMENT ,
    `admin_name` varchar( 45 ) NOT NULL ,
    `group_id` int( 5 ) NOT NULL ,
    `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
    `created_by` varchar( 45 ) DEFAULT NULL ,
    PRIMARY KEY ( `row_id` )
    ) AUTO_INCREMENT =32;

    MySQL sa: Dokumentation
    #1046 - No database selected

    /* ----------------------------------- */
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Mar 2006
    Posts
    2,400
    Rep Power
    1688
    Tables exist within a database. Before you create a table you must have selected a database to place the table in using, if memory serves, the USE command.
    The moon on the one hand, the dawn on the other:
    The moon is my sister, the dawn is my brother.
    The moon on my left and the dawn on my right.
    My brother, good morning: my sister, good night.
    -- Hilaire Belloc

IMN logo majestic logo threadwatch logo seochat tools logo