(Lesson 6 Using Wildcard Filtering)

1. 词汇
wildcards
%  - percent sign: % matches zero,one or more characters (Page 53)
_ - under score
[] - brackets: '[JM]%' and '[^JM]%'  (Page 56)

2. 概念 search pattern  (Page 51)
A search condition made up of literal text, wildcard characters, or any combination of the above. Such as 'Fish%'

3. 概念 predicate   (Page 52)
Technically, LIKE is a predicate, not an operator.

4. 知识点  (Page 54)
Watch for Trailing Spaces
Some DBMSs pad field contents with spaces.  A column expects 50 characters, but stored text "Fish bean bag Toy" is only 17 characters. In this case, 33 spaces may be appended.
LIKE 'F%y' will not work.
LIKE 'F%y%' will work.

5. 知识点  (Page 54)
Watch for NULL
The clause WHERE prod_name LIKE '%' will not match a row with the value NULL as the product name.

posted on 2020-06-21 03:17  balian  阅读(158)  评论(0编辑  收藏  举报