[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mysql
Subject:    Re: Trouble with creating tables
From:       Dana Powers <dana420 () quicknet ! net>
Date:       2000-05-31 17:40:13
[Download RAW message or body]

As the error states, you must select a database for your table. The base mysql
distribution comes with 2 databases: mysql and test. mysql is for system
tables, so you dont want to use that, test is probably a good choice. Try this:

mysql> use test;
mysql> CREATE TABLE shop .......

You can also create a new database:

mysql> CREATE DATABASE mydatabase;

Or see a list of all available databases:

mysql> SHOW DATABASES;


Hope something here helps.
Dana

> CREATE TABLE shop (
> article INT(4) unsigned zerofill DEFAULT '0000' NOT NULL,
> dealer Char(20)		     DEFAULT ''         NOT NULL,
> price double (16,2)		     DEFAULT '0.00'  NOT NULL,
> PRIMARY KEY (article, dealer));
> 
> After the semicolon i press enter i get a error message
> 
> ERROR 1046: No Database Selected
> 

-- 
---------------------------------------------------------------------
Please check "http://www.mysql.com/Manual_chapter/manual_toc.html" before
posting. To request this thread, e-mail mysql-thread38849@lists.mysql.com

To unsubscribe, send a message to:
    <mysql-unsubscribe-mysql=progressive-comp.com@lists.mysql.com>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic