I want to create a below table if it doesn’t exists.
create table TEST (
id number NOT NULL PRIMARY KEY,
url varchar(1000) NOT NULL,
urlHash varchar(255) NOT NULL,
contentHash varchar(255),
modDate varchar(30),
contentLocation varchar(100),
status integer,
lastCrawlDate varchar(30)) ;
So my questions is something like this-
Create Table TEST if doesn't exist
In the same way for sequence-
create sequence test_seq start with 1 increment by 1 nomaxvalue;
Something like this the query will be for sequence too-
Create sequence test_sequence if doesn't exist
You could do an anonymous PL/SQL block:
Similarly, you can use USER_SEQUENCES to look for an existing sequence and adapt this to suit.