MySQL 到 Sybase
Sybase for MySQL 中的等效项是什么:
- SHOW KEYS FROM
- DESCRIBE
我刚刚引用了这些链接,但仍然感到困惑:
我猜它有一些东西与 sysobject 和 syscolumns 表以及 sp_helpconstraint 相关,但无法找到解决方案。
What is the equivalent in Sybase for MySQL:
- SHOW KEYS FROM
- DESCRIBE
I've just referred these links, but still in confuse:
Identifying Sybase tables, fields, keys, constraints
Discover primary / unique keys in Sybase ASE
I'm guessing that it has something to do with sysobject and syscolumns tables and sp_helpconstraint, but couldn't reach the solution.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

SHOW KEYS FROM
使用此代码,您可以从表中获取键列表。
为了
syskeys join
正常工作,您必须使用sp_primarykey
和sp_foreignkey
。使用此命令,您可以向syskeys
表添加一行。您还可以使用
sp_helpindex 'tablename'
。有关约束的信息(包括 PRIMARY 和 FOREIGN)也可以通过
sp_helpconstraint 'tablename'
获取。描述
要获取描述信息,只需执行
sp_help 'tablename'
。为了准确获得您需要的内容,您可以通过编辑我上面引用的存储过程并创建新的存储过程来创建您需要的选择。
sp_help
,sp_helpindex
和sp_helpconstraint
位于syssystemprocs 数据库
中。SHOW KEYS FROM
With this code you can get the list of keys from a table.
In order to the
syskeys join
to work properly, you have to usesp_primarykey
andsp_foreignkey
. With this commands you add a row to thesyskeys
table.You can also use
sp_helpindex 'tablename'
.Info about constrainst (PRIMARY and FOREIGN included) can also be obtained with
sp_helpconstraint 'tablename'
.DESCRIBE
To get the describe info just do
sp_help 'tablename'
.In order to get exactly what you need you can create the selects that you need by editing the stored procedures that I referenced above and creating new ones.
sp_help
,sp_helpindex
andsp_helpconstraint
are located insyssystemprocs database
.