Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: HELP: Newbie SQL*Plus question
Don Chambers wrote:
>
> I just download Personal Oracle7. I am new to Oracle and it's been 2
> years since I have done any SQL. I bought a book to help me and when
> I got to the first example (which uses SQL*Plus) I got an error.
> Below is the example and the error message:
>
> SQL> create table customer1 (
> 2 last_name varchar2(3) not null,
> 3 state_cd varchar(2),
> 4 sales number)
> 5 tablespace custspace1
> 6 storage(initial 25k next 25k minextents 1);
> create table customer1 (
> *
> ERROR at line 1:
> ORA-00959: tablespace 'CUSTSPACE1' does not exist
>
> Any help would be greatly appreciated.
> Should I have created a tablespace first? If, so how - the book said
> nothing about it?
Yes, you have to create a tablespace before you can create a table *in* that tablespace. Check out the CREATE TABLESPACE command help in the SQL Languange mnual:
CREATE TABLESPACE custspace1
datafile 'C:\myspaces\custd01.tbs' size 100M REUSE default storage (initial 5M next 1M minextents 1 maxextents 4 pctincrease 0 ) ONLINE;