This month's discount Comprehensive Database Performance Health Check · Testimonials
SQLAuthority with Pinal Dave
Home
  • Consulting
    • Health Check
  • Free Videos
  • All Articles
    • AI
    • SQL Performance
    • SQL Tips and Tricks
    • Interview Questions and Answers
    • SQL Puzzle
    • SQL Video
    • SQLAuthority News
    • Personal
  • Books
  • Consulting
SQL SERVER - Primary Key Constraints and Unique Key Constraints

SQL SERVER – Primary Key Constraints and Unique Key Constraints

February 5, 2007
Pinal Dave
SQL Performance
Database, Software Development, SQL Coding Standards, SQL Constraint and Keys, SQL Download, SQL Error Messages, SQL Index, SQL Joins, SQL Scripts, SQL Server Security

Primary Key and Unique Key both enforce uniqueness, but they differ in the index they create and in NULL handling. Here are the differences and the scripts.

Read More
SQL SERVER - UDF - Function to Convert Text String to Title Case - Proper Case

SQL SERVER – UDF – Function to Convert Text String to Title Case – Proper Case

February 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

My UDF udf_TitleCase converts any string to Title Case, also called Proper Case. The post has a sample call, its output and the full T-SQL code of the function.

Read More
A sunlit gouache workshop shows a localized repair within an otherwise orderly ceramic inlay panel.

SQL SERVER – ReIndexing Database Tables and Statistics with Targeted Maintenance

January 31, 2007
Pinal Dave
SQL Performance
Best Practices, SQL Constraint and Keys, SQL Cursor, SQL Index, SQL Joins, SQL Scripts, SQL Server DBCC, SQL Stored Procedure

ReIndexing Database tables starts with a measured maintenance need. I check the workload before choosing an index operation.

Read More
A row of wooden crates of different sizes with one towering over the rest, being measured with a tape.

SQL SERVER – Query to find number Rows, Columns, ByteSize for each table in the current database – Find Biggest Table in Database

January 10, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure

A query to find the biggest table in database: it lists row count, column count and data size for each table using sp_spaceused, sorted by data size.

Read More
SQL SERVER - Simple Example of Cursor

SQL SERVER – Simple Example of Cursor

January 1, 2007
Pinal Dave
SQL Tips and Tricks
SQL Cursor, SQL Scripts

The simple example of cursor I have used for years: declare it, open it, fetch each Account_ID in a WHILE loop, then close and deallocate the cursor.

Read More
A barrel marked LOG overflowing with paper, and a person hesitating at the tap.

SQL SERVER – Shrinking Truncate Log File – Log Full

December 30, 2006
Pinal Dave
SQL Performance
SQL Backup and Restore, SQL Scripts, Transaction Log

The old code I used to truncate log file space with DBCC SHRINKFILE and BACKUP LOG WITH TRUNCATE_ONLY. It breaks the log chain, so take a full backup after.

Read More
SQL SERVER - Fix : Error 14274: Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server. The job was not saved.

SQL SERVER – Fix : Error 14274: Cannot add, update, or delete a job (or its steps or schedules) that originated from an MSX server. The job was not saved.

December 20, 2006
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Stored Procedure

Error 14274 shows up when you update or delete SQL Server 2000 jobs after the Windows server was renamed. Here is why it happens and the steps to fix it.

Read More
Previous 1 … 361 362 363 364 365 Next
  • Books
  • Testimonials
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com