倒向类语句
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了倒向类语句相关的知识,希望对你有一定的参考价值。
Sometimes you need TO think backwards. Here was the problem. I needed TO MATCH up SOME IP address ranges TO the company that owns them. Looking FOR a simple solution TO the problem I came up WITH storing the IP address block patterns IN the DATABASE AS follows: ip_pattern ---------------- 127.%.%.% 192.168.%.% 10.%.%.% Any idea why I choose % AS the wildcard? That's right - it's the wildcard operator IN SQL FOR the LIKE statement. So now WHEN I have have an IP address 192.168.1.1, I can do what I LIKE TO CALL a backwards LIKE query: SELECT company, ip_pattern FROM company_blocks WHERE '192.168.1.1' LIKE ip_pattern
以上是关于倒向类语句的主要内容,如果未能解决你的问题,请参考以下文章