How to create a table under a user
Hello!I got a problem by creating tables under a user.
I first created a database with oracle universell installer.
I then loged in to it with Toad as SYS and created:
CREATE USER my_user IDENTIFIED BY my_password;
Then I thought that tables etc will be assigned to my_user if I log out SYS and log in as my_user in Toad.
My idea was to do:
CREATE TABLE Countries
(
id INT NOT NULL,
name VARCHAR(255) NOT NULL,
PRIMARY KEY (id)
);
CREATE SEQUENCE Sequence_Countries_id
START WITH 1
INCREMENT BY 1
NOMAXVALUE;
CREATE TRIGGER Trigger_Countries_id
BEFORE INSERT ON Countries
FOR EACH ROW
BEGIN
SELECT Sequence_Countries_id.NEXTVAL INTO :NEW.ID FROM DUAL;
END;
But when I get to CREATE TRIGGER Trigger_Countries_id I get an error saying, "can not create triggers for object belonging to SYS"
Do you huys see if I'm missing something.
Do need something called tablespace?
Best regards
Fredrik