Re: Newbie SQL question
Date: 1996/08/07
Message-ID: <320912e8.32926375_at_news.nosc.mil>#1/1
On Fri, 02 Aug 1996 06:31:58 -0400, David J Roth <droth_at_adaptron.com> wrote:
>Atif Ahmad Khan wrote:
>>
>> So I bought this "Oracle: A beinner's guide" that has a couple
>> of chapters on SQL. First one is "SQL 101". And the first example
>> is :
>>
>> create table customer (
>> last name varchar2(30) not null,
>> state_cd varchar(2),
>> sales number)
>>
>> tablespace custspace storage (initial 25k next 25k minextents 1);
>>
>> I have tried processing this script using sqldba/sqlplus in Personal
>> Oracle 7 for Windows 95 and Oracle 7 workgroup server for Solaris x86
>> but I get error for the last line.
>>
>> Since I am very new to SQL, I am not sure if I am missing anything.
>> Why is author using a tablespace that does not exist ?
>>
>> I would appreciate it very much if someone could throw some light
>> at this. Thanks very much in advance.
>>
>> Atif Khan
>> aak2_at_ra.msstate.edu
>
>The following query should tell you what tablespaces exist. It assume you are signed in
>as system or sys.
>
>select tablespace_name
>from sys.dba_tablespaces;
>
>Good Luck.
You may also try:
select tablespace_name
from user_tablespaces
where status <>'INVALID';
This is useful if you are not sys or system user. It will return only tablespaces on which your user has rights to use.
Steve Liebler [http://www.logicworks.com] Senior Product Consultant stevel_at_logicworks.com Logic Works, Inc. Phone: 609.514.2037
- Introducing ModelMart. *
- Now you can share ERwin models *
- without losing control *