摘要
SQL中量词的使用是一个难题,给数据库程序员带来了许多不便。文中分析了SQL中量词的一般使用方法,提出了一种基于Count聚集函数的替代方法。两个查询实例说明,相对于含量词的SQL语句,基于替代方法的SQL语句不含量词,容易理解和构造,执行效率也较高。
The usage of qualifiers in SQL is a difficuh problem which brings a lot of inconvenience to database programmers. The ordinary way of using qualifiers in SQL is analyzed, and then an alternative method based on the aggregated function COUNT is proposed. Two examples show that in comparison with SQL statements including qualifiers, SQL statements based on the alternative method exclude qualifiers, and they are easier to understand and write, and have a higher efficiency.
出处
《电子科技》
2009年第8期52-54,共3页
Electronic Science and Technology