This is very simple and can be achieved using system table sys.tables.
USE YourDBName
GO
SELECT *
FROM sys.Tables
GO
This will return all the tables in the database which user have created.
Reference : Pinal Dave (https://blog.sqlauthority.com) , BOL
448 Comments. Leave new
Hi Pinal Dev,
I m using sql server2005. i run a query like…
—sp_helpdb —-which is showing all databses name with details. but i want’s to view only the –database_Name–plz help with this
Thanx
Rakesh Fhaujdar
select name from sys.databases
select name from master.sys.databases
Is there any chance to get back accidentally deleted(Using drop command)) database..?
Only if you have latest backup
Select the database from the database list,type select * from sysobjects;
it will show all of the tables that belongs to that database.
How to change values of colums from a table in SQL 2000.
You need to use UPDATE statement
Can anyone provide me SQL 2000/2005/2008 tuturial pdf.
Ranjan,
Paste this entire string on GOOGLE search page.
filetype:PDF SQL Server 2008 ebook
Regards,
Aashish
What is the relation between SQL servers and IIS.
Both are different. In what aspect do you want to know?
Hi Pinal,
How to display the tables in a particular database?
when i execute the below query it showing all the tables in the all the databases
select * from sys.tables
is there any direct query to list the tables in a particular database?
thanks
Koteswar rao
It displays tables from the current database only
select * from sys.tables
where type=’p’
how to i create the simple employee table is sql server 2005
Create table employee
(
empid varchar(10) primary key,
first_name varchar(30) not unll,
last_name varchar(30) not null,
dob datetime not null,
.
.
.)
Thanks Guys
I want to subscribe
If you want to subscribe to this site, read this blog post
How to import data from oracle database to sql database.Not by genarating any text file.
It’s need to be imported through DB Link .
You can make use of import/export wizard from SQL Server
what are the concept of all database object and short note on each object
Your question is not clear. Can you give us more informations?
Hi Pinal,
I have a question about show/hide table columns in sql server based user permissions.
How can we write a query for above thing.
Please mail me or or answer my question in the post.
Thanks,
Kiran Kumar
Hi Pinal,
Is it possible to move the TEMPDB database to other drive or location ?
Read about Alter database in SQL Server help file
How can i see the all database tables in sql server 2000
how do i list the all tables in sql serve 2000
There are many mehtods
1 exec sp_tables
2 select * from sys.tables
3 select * from information_schema.tables
ya sure
How to detect and count the scanning table. I need to count query of select, insert,update, delete the table. I need to check how much has been used a table.
Can you give us more informations on what you want to do?
Hi All,
Anybody can help me how to find all db user list using script?
if u know Please send me mail.
select * from sys.sysusers
hi,
i want to clarify the difference betwwen no_truncate and with truncate_only.
pls reply..