本文介绍了如果按Enter键,如何在查询条件中显示整个表格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个学生桌,我也查询了他们的性别.当我在查询中输入male时,它将向我显示所有男学生,并且每当我输入female时,它将向我显示所有女学生.如果我按Enter键而不输入特定性别,是否有可能看到所有这些信息?如果是这样,我该怎么做?

Let's say I have a students' table, and I also have a query for their gender. When I type male in the query it'll show me all the male students and whenever i type female it'll show me all the female students. Is it possible that if I press enter without typing a specific gender, I would get to see all of them? If so, How do I do that?

非常感谢!

推荐答案

使用LIKE和通配符.

Use LIKE and wildcard.

SELECT * FROM Students WHERE Gender LIKE [enter gender] & "*";

您只需输入F或M或什么都不输入.

All you have to enter is F or M or nothing.

这篇关于如果按Enter键,如何在查询条件中显示整个表格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-29 17:34