mysql庫和使用者手冊 MySQL庫和表相關操作

2021-10-20 23:07:59 字數 1882 閱讀 6151

mysql建庫、表相關的操作

指定字符集建庫

query ok, 1 row affected (0.00 sec)

*************************** 1. row ***************************

1 row in set (0.00 sec)

注意:mysql5.1和mysql5.5環境的預設建表語句中的引擎是不同的。如果希望控制表的引擎,就要在建表語句中顯示的指定引擎建表

mysql5.1以及之前預設引擎為myism

mysql5.5.5以後預設引擎為innodb

myisam管理非事務表。它提供高速儲存和檢索,以及全文搜尋能力。

mysql表的字段型別

整型列型別位元組最小值最大值tinyint1**-128 **127

smallint2-3276832767

mediumint3-83886088388607

int4-21474836482147483647

bigint8-92233720368547758089223372036854775807

日期時間型別

列型別位元組"零"值date3'0000-00-00'

datetime8'0000-00-00 00:00:00'

timestamp400000000000000

time3'00:00:00'

year10000

字串型別

值char(4)儲存需求varchar(4)儲存需求''' '4''1

'ab''ab '4'ab '3

'abcd''abcd'4'abcd'5

'abcdefgh''abcd'4'abcd'5

典型建表語句

`uid` int(10) unsigned not null auto_increment comment '使用者id',

`nickname` char(16) not null default '' comment '暱稱',

`***` tinyint(3) unsigned not null default '0' comment '性別',

`birthday` date not null default '0000-00-00' comment '生日',

`qq` char(10) not null default '' comment 'qq號',

`score` mediumint(8) not null default '0' comment '使用者積分',

`login` int(10) unsigned not null default '0' comment '登入次數',

`reg_ip` bigint(20) not null default '0' comment '註冊ip',

`reg_time` int(10) unsigned not null default '0' comment '註冊時間',

`last_login_ip` bigint(20) not null default '0' comment '最後登入ip',

`last_login_time` int(10) unsigned not null default '0' comment '最後登入時間',

`status` tinyint(4) not null default '0' comment '會員狀態',

primary key (`uid`),

unique key `nickname` (`nickname`)

) engine=myisam auto_increment=2 default charset=utf8 comment='會員表'

檢視表結構

檢視建表語句

注意: \g 為指定顯示資料格式

mysql庫和使用者手冊 MySQL庫和表相關操作

mysql建庫 表相關的操作 指定字符集建庫 query ok,1 row affected 0.00 sec 1.row 1 row in set 0.00 sec 注意 mysql5.1和mysql5.5環境的預設建表語句中的引擎是不同的。如果希望控制表的引擎,就要在建表語句中顯示的指定引擎建表...

oracle ebs使用者手冊

文件如下圖所示 主要包括 概觀 技術 客戶關係管理 crn 合同 財務系統 fin 人力資源系統 hr 採購 po 專案 project 鏈管理 scm 服務 規劃 客戶關係管理 crm 主要包括 2 銷售和市場 sales and marketing,sm 3 客戶資料中心 財務系統 fin 主要...

HEVC 使用者手冊

hevc使用者手冊 gop結構表 結構表中的行數為gop的長度。每幀按照解碼的順序排列。因此frame1是解碼的第一幀。gop表指定解碼端每一幀的所有參考幀。這些參考幀包括當前影象的和未來影象將要用到的參考幀。編碼器不會自動計算那一幀將會被用作未來的參考幀,他們必須被指定。temporal id 當...