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
A to Z alphabet smiley faces.

How to Allow Only Alphabets in Column? – Interview Question #136

August 20, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL Constraint and Keys, SQL Function, SQL Scripts, SQL Server

Question: How to Allow Only Alphabets in Column? Answer: This was a real world scenario and I have mixed feeling about this kind of question.

Read More
SELECT statement for object_id.

SQL SERVER – How to Build Three Part Name from Object_ID – Part 2?

August 8, 2017
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, System Object

Rin Sitah replied to my interview question with a neat alternative way to build three part name from Object_ID using sys.objects and sys.schemas.

Read More
A brass object sits in a smaller case inside a selected large chest

How to Build Three Part Name from Object_ID? – Interview Question of the Week #134

August 6, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Scripts, SQL Server, System Object

If you only have an object_id, can you get the database, schema and object name? Here is a simple script that builds the Three Part Name from Object_ID.

Read More
Gouache painting of a shelf of identical clay flowerpots with seedlings, the second pot painted vermilion

COL_NAME Function in SQL Server: Get a Column Name by ID

July 31, 2017
Pinal Dave
SQL Tips and Tricks
SQL Column, SQL Function, SQL Index, SQL Scripts

The COL_NAME function returns a column’s name when you give it a table’s object ID and the column’s ID. This post uses it to turn the column IDs in index views into names, shows why a column ID is not a position once a column has been dropped, and explains the trap that returns a wrong name when the table lives in another database.

Read More
SQL SERVER - Puzzle - Incorrect Results with Decimal

SQL SERVER – Puzzle – Incorrect Results with Decimal

June 28, 2017
Pinal Dave
SQL Puzzle
SQL Datatype, SQL Function, SQL Scripts, SQL Server

A new puzzle: a simple table with price and discount returns Incorrect Results with DECIMAL. Can you work out why without running the code in SSMS?

Read More
Two connected trunks remain linked while a separate satchel sits apart

What is Copy Only Backup in SQL Server? – Interview Question of the Week #128

June 25, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL Backup and Restore, SQL Function, SQL Scripts, SQL Server

Copy Only Backup is an independent backup that does not break the LSN chain or disturb your regular backup plan. Here is the short answer and a longer one.

Read More
One winnowing fan is idle while another actively separates grain from husks

How to Write Case Statement in WHERE Clause? – Interview Question of the Week #127

June 18, 2017
Pinal Dave
SQL Interview Questions and Answers
SQL Function, SQL Scripts, SQL Server

How to write CASE statement in WHERE clause? First, CASE is an expression, not a statement. Here is how to use it for optional search conditions.

Read More
Previous 1 … 15 16 17 18 19 20 21 … 92 Next
  • Books
  • Testimonials
  • Privacy Policy

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