mysql庫和表 mysql資料庫和資料表

2021-10-17 21:46:00 字數 1158 閱讀 1038

mysql資料庫可支援要求最苛刻的 web、電子商務和聯機事務處理 (oltp) 應用程式。它是乙個全面整合、事務安全、符合 acid 的資料庫,具備全面的提交、回滾、崩潰恢復和行級鎖定功能。mysql 憑藉其易用性、擴充套件力和效能,成為全球最受歡迎的開源資料庫。全球許多流量最大的**都依託於mysql來支援其業務關鍵的應用程式.

資料庫1、建立庫

create database 庫名;

2、檢視庫

show databases;

3、刪除庫

drop databases 庫名;

4、進入庫

use test;

資料表1、建立表(進入庫後)

create table 表名 (a int);

2、建立表

create table 庫名.表名 (a int);

3、檢視表

show tables;

4、刪除表

drop table 表名;

5、檢視表結構

desc 表名;

6、修改表

alter table a1 modify a char(10); 改表結構

alter table a1 add c int; 增加一列

alter table a1 drop c; 刪除一列

alter table a1 change b bb int; 改名

alter table a1 rename a2; 改表名

7、插入資料

insert into 表名 values(資料);

8、刪入資料

delete from 表名 where name=』li』;

9、檢視表

select * from 表名;

select name,tel from 表名 wherename='mary';檢視指定資料

select 5 between 3 and 10;

10、檢視空

select * from 表名 where age isnull;

11、檢視非空

select * from 表名 where age isnot null;

12、模糊查詢

select * from 表名 where namelike 'a%';

%:匹配所有 _:匹配乙個

mysql庫和表 MySQL庫和表的管理

mysql資料庫服務配置好後,系統會有4個預設的資料庫.information schema 虛擬物件,其物件都儲存在記憶體中 performance schema 伺服器效能指標庫 mysql 記錄使用者許可權,幫助,日誌等資訊 test 測試庫 mysql資料庫及表的管理 1.查詢所有資料庫 m...

mysql庫和表 MySQL庫和表的管理

mysql資料庫服務配置好後,系統會有4個預設的資料庫.information schema 虛擬物件,其物件都儲存在記憶體中 performance schema 伺服器效能指標庫 mysql 記錄使用者許可權,幫助,日誌等資訊 test 測試庫 mysql資料庫及表的管理 1.查詢所有資料庫 m...

mysql庫和表 Mysql中關於庫和表的管理

一 庫的管理 1.庫的建立 create database if not exists 庫名 2.庫的修改 一般建立後不修改 rename database 原庫名 to 新庫名 3.庫的刪除 drop database if exists 庫名 二 表的管理 1.表的建立 create table...