Column names, data types, and lengths
I used to list from sysobjects to get this information, but found the INFORMATION_SCHEMA is a lot easier.
2003-05-05
187 reads
I used to list from sysobjects to get this information, but found the INFORMATION_SCHEMA is a lot easier.
2003-05-05
187 reads
Not long ago I was in a forum discussion when someone presented another way to get the date with time value of midnight by doing similar to thisDATEADD(dd,DATEDIFF(dd,0,@DATE),0)Which I find is much cleaner than any other option I have seen or tried myself. Seeing this I realized there are many other dates that can be […]
2003-05-02
503 reads
This procedure will give you the list of tables in the current database along with total columns in the table, no. of rows and the primary key(s) defined for the table.Mohit NayyarMCP, MCAD (.Net), MCSD, MCDBA
2003-04-30
779 reads
Last year I pulished a function ,named fnArabToEnglish,which can convert a arabic number to english ,such as turn 1234.56 to 'one thousand two hundred thirty four and cents fifty six'.Mr Rick send me a message with a bug of thefunction today,I get rid of the bug and publish the second time.I hope you like this […]
2003-04-30
86 reads
Very frequently I used to use sp_help to find column names, datatypes and length of datatypes. Sp_help outputs a lot of data which i really don't require to see. so I devised this script
2003-04-30
124 reads
2003-04-29
410 reads
This script is intended for SQL Server professionals that needs to have a quick snapshot from an environment with all relevant information about the databases. It's a compilation from multiple scripts, and works in SQL Server 2000.I think that works on 7.0 too, but may have some compilation issues.Don´t forget to see the section MANUAL […]
2003-04-28
4,763 reads
to figure out space used by tables. I have seen different versions of them .. here is a very simple effective one!!!
2003-04-28
99 reads
This is one example of how you can make backups with a date stamp for the file name. You can then periodically remove the files that are older than a specified date by simply placing a few lines of code in a job step and calling the supplied sp and passing the date from which […]
2003-04-25
783 reads
This stored procedure will list all user tables in the current database, along with the number of rows in the table. This version uses dynamic SQL to retrieve the number of rows, to overcome the need for an index on all tables. I use this to document legacy databases, I find that they may have […]
2003-04-24
743 reads
I am excited to host T-SQL Tuesday for the first time. I want to...
By Steve Jones
Redgate had some Claude training recently, which I went through as my knowledge has...
By Steve Jones
gnossienne– n. the awareness that someone you’ve known for years still has a private...
WhatsApp 082225313145 Jl. Dokter Sutomo No.50-50A, Ps. Jambi, Kec. Ps. Jambi, Kota Jambi, Jambi...
Comments posted to this topic are about the item Demo Tracking Dropped Objects
Comments posted to this topic are about the item Randomly Selecting Columns and Rows...
If I want to return information about all Database Mail profiles on my instance from T-SQL, how can I do this?
See possible answers