Summer self-study day 10 | database (II) – DML

Time:2021-10-26

DML – data in addition, deletion and modification table

  • Add data

    • insert into t_name(col1, col2, ..., colN) values(type1, type2, ... typeN);
  • Delete data

    • delete from t_name where [condition];
    • truncate table t_nameDelete all data as like as two peas and create a same blank table.
  • Modify data

    • update table t_table set name = '', id = 0 where [condition];

If you delete or modify without the where condition, all columns will be affected

This work adoptsCC agreement, reprint must indicate the author and the link to this article

Recommended Today

Object memory layout and object access location

First, feel the memory layout through an example CustomerTest public class CustomerTest { public static void main(String[] args) { Customer cust = new Customer(); } } Customer image.png Memory layout at this time image.png notice: 1. Runtime metadata:There are some information describing the current instance, such as hash value and lock status.2. Name is the […]