Apache Derby: Table Cheat Sheet

Create Table

CREATE TABLE table_name (
   column_name1 column_data_type1 constraint (optional),
   column_name2 column_data_type2 constraint (optional),
   column_name3 column_data_type3 constraint (optional)
);

Create a table is that you can specify the column names and data types using a query.

CREATE TABLE table_name AS SELECT * FROM desired_table WITH NO DATA;

Drop Table

ij> DROP TABLE table_name;

Leave a Reply

Your email address will not be published. Required fields are marked *