You are on page 1of 2

**Manipulating Data** --Insert rows in a table --Insert null values --Insert into table using substitution variable --Update

rows of a table --Delete rows --Truncate table --Indexes --Sequences **Sequences SQL> create sequence seq1 start with 1 increment by 1 maxvalue 12 nocache cycle; Sequence created. SQL> create table table1 ( id number,salary number); Table created. SQL> insert into table1 values(seq1.nextval,4000); 1 row created. SQL> select * from table1; ID SALARY ---------- ---------1 4000 SQL> insert into table1 values(seq1.nextval,6000); 1 row created. SQL> select * from table1; ID SALARY ---------- ---------1 4000 2 6000 SQL> select seq1.currval from dual; CURRVAL ---------2 **INserting null values SQL> create table red (id number, salary number, name number); Table created. SQL> insert into red (id, salary) values(1,2); 1 row created.

SQL> commit; Commit complete. SQL> select * from red; ID SALARY NAME ---------- ---------- ---------1 2 SQL>

You might also like