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 - How to Drop Primary Key Contraint

SQL SERVER – How to Drop Primary Key Constraint

May 12, 2009
Pinal Dave
SQL Tips and Tricks
SQL Constraint and Keys, SQL Scripts

ALTER TABLE … DROP PRIMARY KEY is MySQL syntax and fails in SQL Server with Msg 156. Here is how to drop primary key constraint the SQL Server way.

Read More
SQL SERVER - Questions and Answers with Database Administrators

SQL SERVER – Questions and Answers with Database Administrators

May 11, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, SQL Coding Standards, SQL Scripts

While hiring Database Administrators and senior developers for a large project, we discussed many interesting questions. Here are some, with my own views.

Read More
A SQL Server query in a window.

SQL SERVER – Find Last Date Time Updated for Any Table

May 9, 2009
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Scripts, SQL Table Operation

Want the last date time a table was updated without an UpdatedDate column? The sys.dm_db_index_usage_stats DMV shows it. A quick demo on AdventureWorks.

Read More
Gouache painting: two open burlap sacks stand side by side

INTERSECT: Return Shared Values Once

May 7, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts

INTERSECT returns distinct shared rows, including shared NULL. Compare it with an equality join that preserves matching-pair multiplicity.

Read More
Gouache painting: on an identical drum beside it, a cord cut from a rounded-off measure falls a hair short, leaving a tiny visible gap beside a small vermilion knot

PI: Choose the Precision of a Circle Calculation

May 4, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

PI provides an approximate circle constant. This example keeps radius, circumference and two area calculations together to show when a chosen decimal conversion occurs.

Read More
Column properties window in microsoft sql server management studio.

SQL SERVER – Add or Remove Identity Property on Column

May 3, 2009
Pinal Dave
SQL Tips and Tricks
SQL Identity, SQL Scripts

There is no direct T-SQL to add or remove the identity property on an existing column. Imran Mohammed shows how SSMS does it and what happens behind it.

Read More
A pale stone courtyard path is bordered by white stones, with loose slate, terracotta bricks and a shell beside the edge.

geometry STIntersection: Return the Shared Shape

April 30, 2009
Pinal Dave
SQL Tips and Tricks
Spatial Database, SQL Function, SQL Scripts, SQL Server

geometry STIntersection returns the shared shape rather than only an intersection flag. I inspect its type and emptiness alongside its area. A shared edge has zero area but still contains points.

Read More
Previous 1 … 285 286 287 288 289 290 291 … 365 Next
  • Books
  • Testimonials
  • Privacy Policy

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