Find the answer to your Linux question:
Results 1 to 3 of 3
CREATE DATABASE PROJECTS; SHOW DATABASES; USE PROJECTS; CREATE TABLE PROJECT1 ( empNO INTEGER UNSIGNED, projectID INTEGER UNSIGNED, projectName VARCHAR(100), budget INTEGER UNSIGNED, PRIMARY KEY (empNO)); INSERT INTO PROJECT1 (empNO, projectID, ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Apr 2011
    Posts
    6

    mysql


    CREATE DATABASE PROJECTS;

    SHOW DATABASES;

    USE PROJECTS;

    CREATE TABLE PROJECT1 (
    empNO INTEGER UNSIGNED, projectID INTEGER UNSIGNED, projectName VARCHAR(100), budget INTEGER UNSIGNED,
    PRIMARY KEY (empNO));
    INSERT INTO PROJECT1 (empNO, projectID, projectName, budget) VALUES ("15", "1", "Interface Design", "10000");
    SELECT * FROM PROJECT1;


    i get this error : ERROR 1049 (42000): Unknown database 'Design'

  2. #2
    Linux Guru
    Join Date
    Oct 2007
    Location
    Tucson AZ
    Posts
    3,190
    When you do: Show databases; does your PROJECTS database show?
    If it does and your enter: use PROJECTS and enter show tables, does your table PROJECT1 show?
    Do the correct columns show?

    Can't really see how your are getting the error. The only place Design is shown is in your projectname.

    When I use insert I would do this from your example above:

    INSERT INTO PROJECT1 VALUES ("15", "1", "Interface Design", "10000");
    I don't use mysql often and am not sure what version you are using. Seems like a weird output.

  3. #3
    Trusted Penguin
    Join Date
    May 2011
    Posts
    4,353
    Your mysql commands worked flawlessly on my system. Is there anything in your mysql log (typically /var/log/mysqld.log)?

Posting Permissions

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