VIP精品微课 扫二维码继续学习 二维码时效为半小时

(0评价)
价格: 99999.00元

1. SELECT* FROM tn WHERE FN LIKE '_in%' (%省略)

  •  LIKE '[TJ]im%'.   (TJ有一个在)
  •  LIKE '[^TJ]im%'.  (不是T或者J开头)
  • LIKE '%' + 'im' + '%' (搜索字符串)

2. ROW_Number 函数

  • SELECT ROW_NUMBER() OVER (ORDER BY ProductID) AS ROWNumber, ProductNumber,
[展开全文]
jessihuang · 2022-04-25 · 0

Data Querying

1. a. 数据:CRUD ( 增删查改Post, Get, Put, Delete)

b. 集合: 子交并补

c.优化

2. SELECT...FROM...

  • e.g SELECT TOP 100 * FROM Tablename (取范围)
  • e.g SELECT TOP 10 PERCENT * FROM Tablename (取比例范围)
  • e.g select 列名1,列名2 from tablename (大小写不敏感,逗号分开
  • SELECT 列名1 as 新名,列名2 as 新名 FROM tablename (取名
  • e.g SELECT
  • FirstName, LastName, FirstName+' '+LastName AS FullName From (计算列
  • ORDER BY FirstName, DESC倒序 LastName ASC正序 (排序)
  • SELECT DISTINCT 
  • SELECT FN, LN From Tablename WHERE FN="name"(不等于 !=)  (条件)
  • WHERE FN="" or LN=""
  • WHERE productID Between.. AND..
  • Comparison Operator: <> not equal, != not equal to, !< not less than, !> not greater than.

If 200> ANY(SELECT ProductID FROM tablename)

BEGIN

    SELECT 'YES"

END

ELSE

BEGIN

SELECT'NO'

 

[展开全文]
jessihuang · 2022-04-21 · 0