| oci_pdo_transaction1.htm |
Objectives:
|
| Step:1 Creating a table, mystaff CREATE TABLE mystaff( id NUMBER(2), fname VARCHAR2(20), lname VARCHAR2(30))
Check this empty table
|
| Step:2Adding Unique constraints ALTER TABLE mystaff ADD CONSTRAINT uq1 UNIQUE (id) DISABLE
Verifying unique constraints
|
| Step:3 Enable Unique constraint ALTER TABLE mystaff ENABLE CONSTRAINT uq1
VERIFY : SELECT TABLE_NAME, CONSTRAINT_NAME, STATUS FROM USER_CONSTRAINTS
|
| Step:4: inserting data n this table using pdo_transaction
application insert into mystaff (id, fname, lname) values (10, 'Dan', 'Parker')
Verifying the above insert query
|
| Step:5 Testing Rollover: id was 4 digit integer insert into mystaff (id, fname, lname) values (1001, 'Peter', 'Pan')
Now add id that would be 2 digit integer
Verify the above action.
|