To create another table the basic syntax is CREATE TABLE ( ) ; To create a table to hold information about dogs Create table dogs ( Dog_name varchar2(20), Dog_type varchar2(20), Dog_weight number ) ; Table created. SQL> desc dogs; Name Null? Type ----------------------------------------- -------- ---------------------------- DOG_NAME VARCHAR2(20) DOG_TYPE VARCHAR2(20) DOG_WEIGHT NUMBER This created a table called DOGS with three columns. Two columns hold character data up to 20 characters and the third column holds numeric data. Delete a table; DROP TABLE ; To delete table dogs Drop table dogs; Table dropped. To insert some data into the dogs table we would use an insert statement like Insert into dogs (dog_name, dog_type, dog_weight) values ( 'Homer', 'Golden Retriever', 75 ) ; This inserts one row into the DB and commits the value; We can check the content of this table : SQL> select * from dogs ; DOG_NAME DOG_TYPE DOG_WEIGHT -------------------- -------------------- ---------- Homer Golden Retriever 75 Lets say we want to modify the value in this table we can issue an update statement UPDATE dogs SET dog_weight = 65 WHERE dog_name = 'Homer' ; Now reselecting we get SQL> select dog_name,dog_weight from dogs ; DOG_NAME DOG_WEIGHT -------------------- ---------- Homer 65 Lets say we want to add a column called STATUS to the table dogs (An ALTER statement) SQL> alter table dogs add (status varchar2(10) ) ; Table altered. SQL> desc dogs Name Null? Type ----------------------------------------- -------- ---------------------------- DOG_NAME VARCHAR2(20) DOG_TYPE VARCHAR2(20) DOG_WEIGHT NUMBER STATUS VARCHAR2(10) There will be no value in that column until we update the table and add a value As shown SQL> select dog_name,dog_weight,status from dogs ; DOG_NAME DOG_WEIGHT STATUS -------------------- ---------- ---------- Homer 65 So to add a value to status for the row for Homer we would do an update: SQL> update dogs set status='Dead' where dog_name='Homer' ; 1 row updated. Now selecting we get SQL> select dog_name,dog_weight,status from dogs ; DOG_NAME DOG_WEIGHT STATUS -------------------- ---------- ---------- Homer 65 Dead Let’s add more data to the same table: Insert into dogs (dog_name,dog_type, dog_weight, status) values ( 'Sonny','Mutt', 75, 'Dead' ) ; Insert into dogs (dog_name,dog_type, dog_weight, status) values ( 'Ginger','Golden Retreiver', 45, 'Dead' ) ; We can select three rows out now: SQL> select dog_name from dogs; DOG_NAME -------------------- Homer Sonny Ginger To delete one of these rows we would type Delete from dogs where dog_name='Ginger' ; At the SQL> prompt this would like SQL> Delete from dogs where dog_name='Ginger' ; 1 row deleted. Now reselecting looks like : SQL> select dog_name from dogs; DOG_NAME -------------------- Homer Sonny display all tables select * from sysusers