I am new to MySQL commands. please, I tried creating a table using the MAMP MySQL editor and I got an error #1046 No database selected..Below is the simple code:
[code]
CREATE TABLE EMPLOYEE_TABLE AS:
(SSN NUMBER(9) NOT NULL,
LAST_NAME VARCHAR2(20) NOT NULL,
FIRST_NAME VARCHAR2(20) NOT NULL,
MIDDLE_NAME VARCHAR2(20) NOT NULL,
ST ADDRESS VARCHARS2(20) NOT NULL,
CITY CHAR(20) NOT NULL,
STATE CHAR(2) NOT NULL,
ZIP NUMBER(4) NOT NULL,
DATE_HIRED DATE)
STORAGE(INITIAL 3K,
NEXT 1K)
[/code]
\sat the MySQL prompt. In practice I think recent installations are all version 5.5 right now (and in most cases any documentation written for version 5 will be fine).SSN NUMBER(9)Not related to the question, but if that is a social security number, do not store it in plain text!