/*===== SQL create table statement CREATE TABLE name (attrib_name attrib_type any_additional_constraints, ..., PRIMARY KEY(attrib_name, attrib_name, ...) ); * for our purposes right now, a primary key is a set of one or more attributes whose value, together, uniquely determines/selects a row * there might also be a foreign key -- this is the primary key of one table added deliberately to another to be able to relate them: FOREIGN KEY (attrib_name, ...) REFERENCES tbl_name, * and you can destroy an existing table with: DROP TABLE name; OR... if you want to destroy it EVEN IF it might, ah, negatively impact other tables, use: DROP TABLE name CASCADE CONSTRAINTS; (in a script creating an entire database, I might use this so I can put a DROP TABLE statement before each CREATE TABLE statement...) ====*/ prompt ================= prompt my first table: prompt ================= prompt drop table parts; create table parts (part_num integer, part_name varchar2(25), quantity_on_hand smallint, price decimal(6, 2), /* up to 6 places total 2 of which are fractl */ level_code char(3), last_inspected date, primary key (part_num) ); /*==== SQL*Plus command describe ...describes the specific table in the current database DESCRIBE tbl_name =====*/ describe parts /* first example of an insert */ insert into parts values (10603, 'hexagonal wrench', 13, 9.99, '003', '05-SEP-2016'); insert into parts values (10604, 'octagonal wrench', 14, 8.99, '008', sysdate); /* you can see all the contents of a table with: SELECT * FROM table_name; */ select * from parts;