dcsimg

Code Example 1:

select o.name, rows
from sysobjects o inner join sysindexes i on o.id = i.id
where i.indid < 2
order by o.name

Code Example 2:

Create proc dbcc_table
@tabname varchar(30)
as 
BEGIN
  Exec ("dbcc checktable (" + @tabname + ")")
END
go

/*** To test the SP ***/
dbcc_table syslogs

Code Example 3:

Select "bcp " + db_name()
+ ".." + name + 
" out c:\temp\" + name + ".txt /c -t\t -SserverName
-UuserID -Ppassword /b1000" 
from sysobjects
where type = "U"
order by name