Search
 
SCRIPT & CODE EXAMPLE
 

SQL

oracle create table auto generated primary key

-- For oracle 12c or later 
-- auto inc
create table t1 (
    c1 NUMBER GENERATED by default on null as IDENTITY,
    c2 VARCHAR2(10)
    );
-- More options for initial value and increment value
create table t1 (
    c1 NUMBER GENERATED ALWAYS as IDENTITY(START with 1 INCREMENT by 1),
    c2 VARCHAR2(10)
    );
Comment

PREVIOUS NEXT
Code Example
Sql :: t-sql merge example 
Sql :: DB: in eloquent using sql 
Sql :: how to delete user in mysql 
Sql :: declare variables sql 
Sql :: postgres create extension if not exists 
Sql :: sql_calc_found_rows 
Sql :: Get the Db column names from a SqlDataReader 
Sql :: oracle nextval insert 
Sql :: mysql drop database 
Sql :: script sql backup database sql server 
Sql :: sql select into 
Sql :: alter schema sql server 
Sql :: select last row in sql 
Sql :: list of all table names in sql server databse 
Sql :: mysql datetime to date 
Sql :: how to calculate number of days between two dates excluding weekends in oracle 
Sql :: wildcard in sql 
Sql :: update auto increment value in mysql 
Sql :: postgres : ERROR: division by zero 
Sql :: sql find duplicate records in two tables 
Sql :: select list is not in group by clause and contains nonaggregated column codeigniter 
Sql :: postgresql concatenate multiple rows into one row 
Sql :: ascending order and where in sql 
Sql :: create function syntax sql server 
Sql :: oracle login as sysdba 
Sql :: sqlalchemy update row 
Sql :: sql select case when 
Sql :: mysqli connect 
Sql :: raiserror nowait sql server 
Sql :: rename a column in sql server 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =