MYSQL基礎學習知識點

來源:互聯網
上載者:User

標籤:style   color   ar   sp   strong   資料   on   bs   ef   

【watch and learn】

1.mysql不支援top x用法,支援limit x,y用法;

2.多表串連查詢
 1. table1 INNER JOIN table2: 內串連。只顯示串連的兩張表的交集行。
 2. table1 LEFT JOIN table2: 左外串連。顯示table1的所有行,即使在table2中沒有匹配的行。
 3. table1 RIGHT JOIN table2:右外串連。顯示table2的所有行,即使在table1z中沒有匹配的行。
 4. table1 FULL JOIN table2: 即使table1中的行在table2中沒有匹配,或者table2中的行在table1中沒有匹配。它仍返回table1和table2兩張表中所有匹配的行。

3. 類型int(M)

1 bytes = 8 bit ,一個位元組最多可以代表的資料長度是2的8次方,在電腦中也就是 -128到127

tinyint 一個位元組、 smallint  兩個位元組、 MEDIUMINT 三個位元組、 int 四個位元組、 BIGINT 八個位元組。

BIT[M] 位欄位類型,M表示每個值的位元,範圍從1到64,如果M被忽略,預設為1

MYSQL基礎學習知識點

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.