search

Month: June 2015


Create and auto-increment field using “sequence” in Oracle database

Posted by in Oracle SQL

Create a database table: create table Books ( bookID number(38), title varchar2(50), author varchar2(50), pages number(38), constraint pk_bookID PRIMARY KEY(bookID) ); Create a sequence: Create sequence sequence_name start with value increment by value minvalue value maxvalue value; ***** For example **** Create sequence auto_incr start with 1 increment by 1; Insert some sample data into…


Checking your current Oracle database version

Posted by in Oracle SQL

To check for your current Oracle database version number: SELECT * FROM V$VERSION;


Drop a table in Oracle database

Posted by in Oracle SQL

Delete database table and all data in the table: DROP TABLE table_name PURGE;


close
search

Hi, guest!

settings

menu