使用 Oracle SQL Developer 作为我的客户端时如何为 SQL Server 调用 sp_help [table]

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3106711/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-01 06:40:04  来源:igfitidea点击:

How to call sp_help [table] for SQL Server when using Oracle SQL Developer as my client

sqlsql-serverlinuxsql-server-2005

提问by tim_wonil

I am using Oracle SQL Developer in a linux environment to connect to an SQL Server 2005.

我在 linux 环境中使用 Oracle SQL Developer 连接到 SQL Server 2005。

I don't seem to be able to make a sp_help [table_name] call. Previously, I found it quite useful when I was on a Windows environment using SQL Server management, and could make that call.

我似乎无法进行 sp_help [table_name] 调用。以前,当我在使用 SQL Server 管理的 Windows 环境中时,我发现它非常有用,并且可以进行该调用。

Is there any way to do this?

有没有办法做到这一点?

[edit] error message returned is the following:

[编辑] 返回的错误消息如下:

Error starting at line 1 in command:
sp_help city
Error report:
Unknown Command

回答by Conrad Frix

Have you considered using the information_schema views instead. E.g.

您是否考虑过使用 information_schema 视图。例如

Select *
from information_schema.columns
where table_name = 'City'

回答by VRDataStage

this works: exec sp_helptable 'table_name'

这有效: exec sp_helptable 'table_name'

回答by appr

Have you tried exec sp_helptable [table_name]?

你试过exec sp_helptable [table_name]吗?

回答by gbn

Sorry to say this, but SQL Server won't care about the string it's sent in the batch so it's problem with the client or the driver.

很抱歉这么说,但 SQL Server 不会关心它在批处理中发送的字符串,所以它是客户端或驱动程序的问题。

If you have to use Linux, try SQuirreLinstead which is a vey nice tool

如果您必须使用 Linux,请尝试使用SQuirreL,这是一个非常好的工具

回答by veer7

exec sp_help [db.schema.table]works

exec sp_help [db.schema.table]作品