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 |
Can sql servers link to other servers?
Hello all, I have data like :- year amt 2004 10 2005 20 2006 30 Now i want output as:- 2004 2005 2006 10 30 60 but i have to use here group by on year.So, i need a single query within that i can find.
What is the full form of dql?
What is the difference between composite index and covering index?
What is snapshot replication?
Please give me the SP for the below scenario. I have two tables named Table1 and Table2...I need to fetch record by record from Table1 and insert the record in to table2 where the value in the sno column of the table1 is even number.
How would we use distinct statement? What is its use?
What is hot add cpu in sql server 2008?
I am learning Testing, so i want to learn SQL also because SQL is important for Testing. I want to know which is best Institute in Ameerpet or SR Nagar or any other place in Hyd? Please help me.
What is difference between getdate and sysdatetime in sql server 2008?
Please explain that what are the basic functions for master, msdb, model, tempdb and resource databases? : SQL Server Architecture
Explain log shipping and mention its advantages.