SQl CASE 語句的嵌套使用方式 case具有兩種格式。簡單case函數和case搜尋函數。 1.簡單case函數case sex when ’1’ then ’男’ when ’2’ then ’女’else ’其他’ end 2. case搜尋函數case when sex = ’1’ then ’男’when sex = ’2’ then ’女’else ’其他’
SQL語句 SELECT LIKE 用法詳解 LIKE語句的文法格式是:select * from 表名 where 欄位名 like 對應值(子串),它主要是針對字元型欄位的,它的作用是在一個字元型欄位列中檢索包含對應子串的。 假設有一個資料庫中有個表table1,在table1中有兩個欄位,分別是name和sex二者全是字元型資料。現在我們要在姓名欄位中查詢以“張”字開頭的記錄,語句如下: select * from table1 where name like
create view v_kucun as(select st.date "日期", round(sum(case st.c_type when 106 then case st.p_type when 102 then st.ins - st.outs end end), 2) "甲班鍊鋼庫存", round(sum(case st.c_type when 106 then case st.p_type when 103 then st.ins - st.outs end end), 2)
表結構+-------+-------------+------+-----+---------+-------+| Field | Type | Null | Key | Default | Extra |+-------+-------------+------+-----+---------+-------+| id | int(11) | NO | PRI | | || name | varchar(20) | YES |
首先開啟Google,在關鍵詞輸入框中輸入"index of/"inurl:lib(雙引號為英文狀態下),選擇“搜尋簡體中文網頁”選項,斷行符號搜尋,得到了一些網頁,不要以為這是一些普通的頁面,其實它們是一些圖書網站的資源清單,點擊開啟它來看看,怎麼樣?是不是所有資源一收眼底了? 使用其他關鍵字可能得到更多的資源 在搜尋方塊上輸入:"index of /"cnki 再按搜尋你就可以找到許多圖書館的CNKI、VIP、超星等入口! 在搜尋方塊上輸入:"index of /"