標籤:折騰了半天終於把這個給折騰順了,但是後來發現用不了竟然。。。悲劇啊,但是還是要記錄下加深記憶 insert into table1 (field1, field2,field3) select ?field1,?field2,?field3 from tempwhere not exists (select field1,field2,field3 from table1 where field1=?field1 and field2=?field2
標籤:資料庫概述:層次模型:樹狀關係網狀模型:網狀關係關聯式模式:表格關係CRUD:C:CreateR:ReadU:UpdateD:Delete資料庫語言分類:DQL:資料查詢語言——RDML:資料操作語言——CUD關於資料庫的操作:|——建立資料庫: create database 資料庫名;|——查看所有資料庫: show databases;|——使用某個資料庫: use 資料庫名;|——刪除資料庫: drop database 資料庫名;|——查看資料庫編碼:show
標籤:innodb_file_per_tableMySQL5.6.6以後預設innodb_file_per_table=ON,開啟獨立資料表空間後每張表有二個檔案:.frm file contains table structure/definition.ibd file contains data of table as well as index下面是InnoDB引擎獨立資料表空間單張表在不同Server之類的move:一,在目的端建立和源表一樣的表結構(必須表結構一樣)1,源端:show
標籤:需要注意的地方:1、 主伺服器(master)、從伺服器(slave)的資料庫版本不能誇大版本,可以小版本的差異。但是從伺服器的mysql版本盡量不要低於master的mysql版本。負責需要在master中加入binlog-checksum = none(由於5.6使用了crc32做binlog的checksum。除了把master的設定從crc32改到non)一般這樣的錯誤碼:Slave can not handle 
標籤:mysql 查看大小查詢所有資料庫佔用磁碟空間大小的SQL語句:select TABLE_SCHEMA, concat(truncate(sum(data_length)/1024/1024,2),‘ MB‘) as data_size,concat(truncate(sum(index_length)/1024/1024,2),‘MB‘) as index_sizefrom information_schema.tablesgroup by TABLE_SCHEMAorder by