LKRussey
LKRussey

Reputation: 11

Sql Server 2005 Database table is not visible whereas stored procedure is visible

Sir,

I've a problem regarding Database.

My problem is I've Database script file.When I integtrated the script file in Database.I found all the stored procedure is visible.But tables are not visible.

I wrote the Command as follows: select * from sysobjects where type='p'

Now all the tables is showing but fields are not.

I wrote the Command to get the fields for particular table_name targeted as

select * from table_name .

But a message is Coming like Invalid Object name as table_name.

Please help me out to find the fields of the table ...

Upvotes: 0

Views: 337

Answers (2)

Andriy M
Andriy M

Reputation: 77707

You can use the following query to retrieve the columns of the sought-for table:

SELECT *
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = 'your table name'

Upvotes: 1

Andomar
Andomar

Reputation: 238176

You can list all columns with:

select * from sys.columns

Upvotes: 0

Related Questions