|
 |
sql_language thread: RE: sql_language digest: November 02, 2000
Message #1 by Gittens Andy <andy.gittens@m...> on Fri, 3 Nov 2000 08:32:39 -0000
|
|
This fetch's Tables and there rowcount,size etc
USE datawarehouse
DECLARE tbl_space CURSOR
FOR
SELECT name FROM sysobjects
WHERE type = 'U' ORDER BY name
OPEN tbl_space
DECLARE @tbl_name sysname
FETCH NEXT FROM tbl_space INTO @tbl_name
WHILE (@@FETCH_STATUS = 0)
BEGIN
EXEC sp_spaceused @tbl_name
FETCH NEXT FROM tbl_space INTO @tbl_name
END
CLOSE tbl_space
DEALLOCATE tbl_space
-----Original Message-----
From: sql language digest [mailto:sql_language@p...]
Sent: Friday, November 03, 2000 12:01 AM
To: sql_language digest recipients
Subject: sql_language digest: November 02, 2000
SQL_LANGUAGE Digest for Thursday, November 02, 2000.
1. Deleting Duplicate records...
2. get table and column names
----------------------------------------------------------------------
Subject: get table and column names
From: Harish Babu.N <harish_babu@c...>
Date: 1 Nov 2000 15:18:36 +0000
X-Message-Number: 2
hi every body
I want to write sql script to get
1.All the table names in the database
2.All the columns in a table
Iam using Sql server.How do i do this?
Thanks in advance
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager (postmaster@m...).
This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.
www.mimesweeper.com www.marshalls.co.uk
**********************************************************************
|
|
 |