java - 如何使用 Java 和 PostgreSQL 执行 \d tablename
问题描述
如何\d tablename
使用 Java 和 PostgreSQL 执行?
PreparedStatement pst = jdbc.conn.prepareStatement("\d u_item");
ResultSet set = pst.executeQuery();
错误:
org.postgresql.util.PSQLException: ERROR: syntax error at or near "\"
解决方案
\d
is a command of the interactive psql
client. It is not part of SQL.
You can't execute this command over a JDBC connection.
推荐阅读
- node.js - 如何处理这个错误 npm ERR!代码 ENOENT npm 错误!系统调用打开 npm 错误!路径 C:\Users\M.Tech/package.json npm 错误!错误号 -4058
- puppeteer - 在 pyppeteer 中加载 JS 脚本时未定义对 Tone 的引用
- c++ - 您如何编写一个程序来测试用户的输入是否为整数并在输入字符时返回消息?
- data-structures - 是否可以在不使用额外数据结构(例如数组、链表)的情况下实现二进制堆
- flutter - dart null 安全变量是否需要手动释放?
- c++ - 如何使用导入来访问概念
- apache-flink - 如何获得 Flink 集群领导者?
- python - Python CPU 调度程序模拟器
- android - 如何在 Jetpack Compose 中显示视频缩略图?
- javascript - 如何在移动 Openlayers 上禁用地图旋转