Skip to content

Oracle Database Base

Oracle database basic usage

1. Create Table

Create Table TABLE_NAME (sequenceno NUMBER(19) not null, \
time TIMESTAMP(6) not null,\
alarmseverity NUMBER(10), \
alarmfield NUMBER(10), \
text VARCHAR2(1000), \
alarmevent NUMBER(19), \
activetype NUMBER(10), \
eventid VARCHAR2(1000), \
primary key(sequenceno) )
- NUMBER(19): Integer type - VARCHAR2(1000): Char type - primary key(sequenceno): Set "sequenceno" as primary key

2. Insert Record

Insert Into H_ASMEvents(SequenceNo,Description) \
Values(1234, DescriptionText,)

3. Update Record

UPDATE H_ASMEvents SET Description = description_text \
WHERE SequenceNo = 1234

4. Select Record

SELECT * FROM H_ASMEvents WHERE SequenceNo = 1234