INFORMATION_SCHEMA
is a special access path that is used for displaying meta data about your system's database and their contents.
select * from information_schema.tables
select * from information_schema.views
select * from information_schema.schemata

Samples of Select Statements:
select orderid, sum(quantity)
from [order details]
where orderid between 11000 and 11002
group by orderid

Samples of Table Variable and More

Run isql from DOS command
isql -UUserAcct -PPassword [-SServer] -iMyStmt.sql

DBCC - Database Consistency Checker
//Identify Fragmentation, see how full the pages and extents in our database:
DBCC SHOWCONTIG (table_object_id, index_id).
// Use function OBJECT_ID(object_name) to get the object_id.

1