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
Gouache painting: two wooden fermenting vats stand on a cellar floor, one narrow and one wide

ABS: Widen an Integer Before Taking Its Magnitude

August 10, 2008
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Function, SQL Scripts, SQL Server

ABS can overflow even when the negative input fits its signed integer type. I widen the input before asking for its magnitude. Casting the output afterward would be too late to protect the calculation.

Read More
SQL SERVER - Fix : Error : 1326 Cannot connect to Database Server Error: 40 - Could not open a connection to SQL Server

SQL SERVER – Fix : Error : 1326 Cannot connect to Database Server Error: 40 – Could not open a connection to SQL Server

August 9, 2008
Pinal Dave
SQL Tips and Tricks
Database, SQL Error Messages, SQL Server Security

If you are receiving the following error related to connection to SQL Server, this blog is for you. 

Read More
An old oak with a propped limb inside a low fence with one gate, a young sapling planted nearby.

Protecting an Instance You Cannot Patch Any More

August 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Migration, SQL Patch, SQL Server, SQL Server Security, SQL Upgrade

Protect an Instance You Cannot Patch with isolation, least privilege, disabled features, tested backups, and a firm retirement date.

Read More
A branching citrus sapling and smaller plants share one movable nursery crate beside a shelf bay

Hierarchyid Subtree: Move With GetReparentedValue

August 8, 2008
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Datatype, SQL Server, SQL Transactions

Move a hierarchyid subtree while keeping stable node identifiers. Check the whole branch, repeated requests, missing endpoints and cyclic destinations.

Read More
SQL SERVER - EXCEPT Clause in SQL Server is Similar to MINUS Clause in Oracle

SQL SERVER – EXCEPT Clause in SQL Server is Similar to MINUS Clause in Oracle

August 7, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

Is there a MINUS clause in SQL Server like in Oracle? Yes, EXCEPT returns the rows of the first query that are not in the second. Example included.

Read More
SQL Query2' results and messages window.

SQL SERVER – Query to Find Column From All Tables of Database

August 6, 2008
Pinal Dave
SQL Tips and Tricks
SQL Data Storage, SQL Scripts, SQL Stored Procedure, SQL System Table

How many AdventureWorks tables have an EmployeeID column? My query on sys.tables and sys.columns finds any column from all tables, with schema names.

Read More
SQL SERVER - 2005 - Get Field Name and Type of Database Table

SQL SERVER – 2005 – Get Field Name and Type of Database Table

August 5, 2008
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

How do you get the field name and type of a table in SQL Server 2005? Imran Mohammed answers with sp_help and an INFORMATION_SCHEMA.COLUMNS query.

Read More
Gouache painting of a wooden board with five round wooden knobs on a cream wall, a blank vermilion tag hanging from the middle knob

Who Changed a Server Setting in SQL Server? How to Find Out

August 4, 2008
Pinal Dave
SQL Tips and Tricks
SQL Audit, SQL Log, SQL Scripts, SQL Server Configuration

Who changed a server setting in SQL Server? The error log records what changed and when, and the default trace adds the login, the computer and the program. Tested with one harmless change that is put back at the end.

Read More
SQL Server query window showing query execution.

SQL SERVER – 2005 – Difference Between INTERSECT and INNER JOIN – INTERSECT vs. INNER JOIN

August 3, 2008
Pinal Dave
SQL Performance
SQL Joins, SQL Scripts

What is the difference between INTERSECT and INNER JOIN? Both can return common rows, and AdventureWorks examples show how the two compare.

Read More
SQL server query results.

SQL SERVER – Effect of Order of Join In Query

August 2, 2008
Pinal Dave
SQL Performance
SQL Index, SQL Joins, SQL Scripts, SQL Server

Does the order of join in a query change the result? With AdventureWorks, I show two queries that return the same rows, only in a different order.

Read More
Previous 1 … 521 522 523 524 525 526 527 … 589 Next
  • Books
  • Testimonials
  • Privacy Policy

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