1. 程式人生 > 其它 >陣列物件根據key 合併分類 去重

陣列物件根據key 合併分類 去重

SQL語言:

1.資料查詢;  select   from

2.資料增加,修改,刪除

A;insert; 增加資料

B; update;修改資料

C:delete:  刪除資料  

3.資料庫的增減刪除操作

create;建立

alter:修改

dorp;刪除

mysql無法啟動

1.連線資料庫報錯

2.在控制檯輸入 net helpmsg 10061檢視原因

 

 3.在工作管理員找到關閉;

克隆表: create table  newname like  oldtablename     需要建立很多表結構一樣的表,那麼這個時候就可以使用克隆的技術來實現建立表

刪除表: drop table tableName;

查看錶建立的過程:

 show create table   tablename  \g;  

 show create table   tablename  \G;

修改表名稱;     rename table  tableOldName  to  tableNewName;

新增一列;   alter table  tablename add 列名 型別;

插入新列至第一行

alter table tablename add 新欄位名稱 型別 first;

插入新列至某一行後面:

alter table tablename add 新欄位名稱 after 某一列的後面;

新增行列註釋

  alter table tableName   add  新列名 型別 comment "說明";

刪除列     alter table tableName drop 列名;

修改欄位型別:

     修改列名; 

 alter table tableName change 舊列名 新列名 型別; alter table tablename modify 欄位名稱 新的型別;

表單管理:

INSERT(插入),UPDATE,DELETE,SELECT操作被稱為MySQL的DML的語句,INSERT,UPDATE,DELETE可以理解為寫的操 作,也就是write,SELECT是⼀個讀的操作,也就是read。

查詢表單內容:

select * from tablename;

 刪除三種方式:

1、指定刪除的資料

2、批量刪除資料 delete from tableName; truncate table tableName:---->針對的是千萬級別的資料,它的刪除效率是非常好的

單條插⼊; insert into tablename values(內容);

   多條插入 ; insert into user values

表插⼊

1.克隆表:

2. 通過insert的⽅式進⾏批量的插⼊  insert into newname select * from oldnew;

3.查詢⽬標表的資料; select * from tablename;