Обсуждение: Odd syntax

Поиск
Список
Период
Сортировка

Odd syntax

От
"Campbell, Lance"
Дата:

I noticed a couple of odd syntax issues today as I set up an SQL script.

 

1)       The following does not work:

 

ALTER SEQUENCE somesequence OWNER TO xyz;

 

Instead you have to use:

 

ALTER TABLE somesequence OWNER TO xyz;

 

But if you drop a sequence the syntax is:

 

DROP SEQUENCE somesquence;

 

Is there a reason ALTER SEQUENCE could not have been used instead of ALTER TABLE?

 

 

2)       I also noticed I cannot create a sequence targeting a particular tablespace.  Example:

 

CREATE SEQUENCE somesequence

  INCREMENT 1

  MINVALUE 1

  MAXVALUE 9223372036854775807

  START 1

  CACHE 1

  TABLESPACE xyz;

 

Why is this?  I thought that when you created a sequence you were in a sense creating a special predefined table in the background.

 

Thanks,

 

Lance Campbell

Project Manager/Software Architect

Web Services at Public Affairs

University of Illinois

217.333.0382

http://webservices.uiuc.edu