SELECT name
FROM sysobjects
WHERE (xtype = 'U')
ORDER BY name
You can modify the xtype value in the WHERE clause to return other information, such as 'V' for views, and 'S' for system tables.
SELECT name
FROM sysobjects
WHERE (xtype = 'U')
ORDER BY name
USE [your database name]
DECLARE @TableName varchar(255)
DECLARE TableCursor CURSOR FOR
SELECT table_name
FROM information_schema.tables
WHERE table_type = 'base table'
OPEN TableCursor
FETCH NEXT FROM TableCursor INTO @TableName
WHILE @@FETCH_STATUS = 0
BEGIN PRINT 'Now reindexing ' + @TableName
DBCC DBREINDEX(@TableName,' ',90)
FETCH NEXT FROM TableCursor INTO @TableName
END
CLOSE TableCursor
DEALLOCATE TableCursor
Internet Explorer Script Error
Line: 307
Char: 2
Error: Unspecified Error
Code: 0
URL:
res://D:\Program%20Files\Microsoft%20SQL%20Server\80\Tools\Binn\Resources\1033\sqlmmc.rll/Tabs.html
"Know the smallest things and the biggest things, the shallowest things and the deepest things. As if it were a straight road mapped out on the ground ... These things cannot be explained in detail. From one thing, know ten thousand things. When you attain the Way of strategy there will not be one thing you cannot see. You must study hard."
- "The Book of Five Rings",Miyamoto Musashi
To reach your full potential as a problem solver involving computers and IT, being able to adapt, learn, and apply your knowledge are keys to success.
Learning by rote will grant you some capacity to deal with problems which come your way. Not all answers can be found in the pages of certification study manuals, textbooks, or explicitly in any form.
You've got to take what you learn, and put that knowledge to use it in a variety of ways until you properly understand it. When you understand why things are happening, you will be much better equipped to apply that information when approaching new problems, extending your knowledge and understanding beyond what you've been taught.