简体   繁体   English

在Java中,在ResultSet元数据请求中使用的“%”参数是什么?

[英]In Java what is the “%” parameter as used in a ResultSet metadata request?

In this example 在这个例子中

ResultSet rsTables = metadata.getTables(null, "%", "%", tableTypes);

I understand the % stands for a wildcard but cannot find any documentation on this. 我知道%代表通配符,但找不到任何文档。 I have found documentation for * and ? 我找到了*?文档? as wildcards, but my only experience with the % is as a modulus in arithmetic operations. 作为通配符,但是我对%唯一经验是作为算术运算中的模数。

The parameters for those functions are (ultimately) used as part of an expression that uses LIKE in a SQL statement that retrieves the requested information. 这些函数的参数(最终)用作在检索所需信息的SQL语句中使用LIKE的表达式的一部分。

The % reflects this, as it is the wildcard for multiple characters in SQL %反映了这一点,因为它是SQL中多个字符的通配符

See eg the Postgres manual for an example 有关示例,请参见例如Postgres手册

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM