作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
在DBI/quote_identifier文档有两种语法:
$sql = $dbh->quote_identifier( $name );
$sql = $dbh->quote_identifier( $catalog, $schema, $table, \%attr );
示例是关于表名的。
如果像这样使用 quote_identifier
来引用列,有什么要反对的吗:
$sql = $dbh->quote_identifier( undef, $table, $column );
最佳答案
是的,那很好。 quote_identifier
不能也不会尝试区分表名和列名,我所知道的每个数据库对它们都有相同的语法。唯一的问题是当您需要像 schema.table.column
这样的列名时,您必须通过多次调用 quote_identifier
来自行构造这些名称。
关于perl - DBI:quote_identifier 和列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14307060/
在DBI/quote_identifier文档有两种语法: $sql = $dbh->quote_identifier( $name ); $sql = $dbh->quote_identifier(
所以当我遇到以下问题时,我正在计划我的应用程序:我希望能够使用 Zend Db Select 进行此查询: 选择COLUMN_NAME AS COLUMN_NAME 来自 INFORMATION_SC
我是一名优秀的程序员,十分优秀!