本文介绍了看起来这应该很容易,但......的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 这是我的表: + ------ + ---------------- + ----- - + ------- + ------- + |制作|型号| fyear | lyear | id | + ------ + ---------------- + ------- + ------- + ------- + | JEEP | CHEROKEE | 1988年| 2002 | 0J723 | | JEEP | CJ-7 | 1986年| 1986年| 0J712 | | JEEP | SCRAMBLER | 1976年| 1985年| 0J711 | | JEEP | COMANCHE | 1986年| 1992年| 0J830 | | JEEP | GRAND CHEROKEE | 1993年| 2002 | 0J731 | | JEEP | GRAND WAGONEER | 1972年| 1991年| 0J742 | | JEEP | PICKUP | 1979年| 1988年| 0J812 | | JEEP |牧羊人| 1987年| 2002 | 0J713 | + ------ + ---------------- + ------- + ------- + ------- + 这是我想要的查询返回:所有可用模型的列表 介于1976年和1987年之间。 这是我应该得到的: CJ-7 SCRAMBLER COMANCHE GRAND WAGONEER PICKUP 牧羊人 我如何说出选择陈述? 谢谢 Bob 解决方案 这不行吗? 从tablename中选择模型,其中fyear> = 1976和lyear< = 1987; Doesn'这项工作是什么? 从tablename中选择模型,其中fyear> = 1976和lyear< = 1987; 这不行吗? 从tablename中选择模型,其中fyear> = 1976和lyear< ; = 1987; Here is my table:+------+----------------+-------+-------+-------+| make | model | fyear | lyear | id |+------+----------------+-------+-------+-------+| JEEP | CHEROKEE | 1988 | 2002 | 0J723 || JEEP | CJ-7 | 1986 | 1986 | 0J712 || JEEP | SCRAMBLER | 1976 | 1985 | 0J711 || JEEP | COMANCHE | 1986 | 1992 | 0J830 || JEEP | GRAND CHEROKEE | 1993 | 2002 | 0J731 || JEEP | GRAND WAGONEER | 1972 | 1991 | 0J742 || JEEP | PICKUP | 1979 | 1988 | 0J812 || JEEP | WRANGLER | 1987 | 2002 | 0J713 |+------+----------------+-------+-------+-------+Here is what I want the query to return: A list of all models availablebetween 1976 and 1987.Here is what I SHOULD get:CJ-7SCRAMBLERCOMANCHEGRAND WAGONEERPICKUPWRANGLERHow would I phrase the select statement?ThanksBob 解决方案Doesn''t this work?select model from tablename where fyear >= 1976 and lyear <= 1987;Doesn''t this work?select model from tablename where fyear >= 1976 and lyear <= 1987; Doesn''t this work? select model from tablename where fyear >= 1976 and lyear <= 1987; 这篇关于看起来这应该很容易,但......的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
06-23 06:24