MySQL 面試中的問題匯總

來源:互聯網
上載者:User

標籤:

1.面試中查詢問題
表中有A、B兩列,使用SQL語句,實習,當A列大於Blie時候,選擇A列,否則選擇B列

select id1,id2,(case when id1>id2 then id1 else id2 end) as result from t4;


類似問題,表t4中,id2大於3記錄為合格,大於5為優秀,否則為不合格

select id1,id2,(case when id2>5 then ‘優秀‘ when id2>3 then ‘合格‘ else ‘不合格‘ end) as result from t4;


2.請取出表tb表中日期(created_ts)為當天的所有記錄(created_ts欄位為datetime類型,包含日期和時間)
select * from where datediff(dd,created_ts,getDate())=0
3.Mysql中sql模式
主要是用來限制是否在資料錄入階段,對非法資料進行相容性處理。
通過select @@ sql_mode查看。
4.char與varchar區別
5.資料複製步驟
6.四種交易隔離等級
7.觸發器與預存程序
8.索引類型、聚簇索引、索引與鎖
9.複合式索引
10.闡述isnull、ifnull、nullIf
11.Mysql中鎖調度
12.死結以及解決辦法
13.MyISAM與InnoDB區別、Mysql常用儲存引擎有哪些
14.主從複製搭建
15.Mysql常用日誌有哪些
16.Mysql最佳化步驟
17.SQL注入以及如何防範

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.