Apache Derby: Data Cheat Sheet

Insert Data

  • Basic syntax of the INSERT statement
ij>INSERT INTO table_name VALUES (column_name1, column_name2, ...);
  •  Two specific columns by mentioning the column names
ij>INSERT INTO table_name VALUES (column_name1, column_name2, ...) VALUES
(value1, value2, ...);
  • Another query in the insert statement as:
INSERT INTO table_Name Query 

Retrieve Data

ij> SELECT column_name, column_name, ... FROM table_name;
Or,
Ij>SELECT * from table_name

Update Data

ij> UPDATE table_name
 SET column_name = value, column_name = value, ...
 WHERE conditions;

Delete Data

ij> DELETE FROM table_name WHERE condition;

Leave a Reply

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