How do I list the available tables in a database I'm
querying?
Answers were Sorted based on User's Feedback
Answer / guest
You can get a list of tables in a database by calling the
INFORMATION_SCHEMA.Tables view like this:
SELECT * FROM information_schema.tables
Is This Answer Correct ? | 7 Yes | 0 No |
Answer / kumar.t
Simple query
To Display only user created table.
Select * from sysobjects where xtype='u'
To Display all table.
Select * from sysobjects
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / sanjeev kumar
First Method:
select table_name from information_schema.tables
Second Method:
Select Name from sysobjects where xtype='u'
Note: here 'u' means user created
Is This Answer Correct ? | 0 Yes | 0 No |
SQL Server Performance Tuning for Stored Procedures & reducing debugging time?
1 Answers CarrizalSoft Technologies,
Explain what are various ways to enhance the ssrs report?
how to know description of a table in sqlserver 2000
Can you roll back the ddl statement in a trigger?
What is recursion? Is it possible for a stored procedure to call itself or recursive stored procedure? How many levels of sp nesting is possible?
How can we determine what objects a user-defined function depends upon?
Disadvantages of the indexes?
what is the main difference between after trigger and instead trigger.
Syntax to find the used space and free space of the Data file in a database(SQL Server). Following queries didn't give the exact Used space and Free Space Information sp_spaceused;DBCC showfilestats;exec MyDbName.dbo.sp_spaceused;SP_HELPFILE Can any one tell me the query for how to find the exact used data file space and free space in a Data File?
How is foreign key related to primary key?
Differentiate between truncate vs delete in mssql?
What is an index?