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 - List All the Tables for All Databases Using System Tables

SQL SERVER – List All the Tables for All Databases Using System Tables

April 26, 2009
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL Stored Procedure, SQL System Table, Undocumented SQL

A one line script with sp_msforeachdb and sys.tables to list all the tables for all databases on a server, updated with ideas from reader comments.

Read More
SQL SERVER - Leading Zero to Number

SQL SERVER – Leading Zero to Number

April 24, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts

Readers keep asking how to add a leading zero to a number. Here are my two earlier articles that pad a number with zeros for a fixed width display.

Read More
SQL SERVER - FIX : Error: 18486 Login failed for user 'sa' because the account is currently locked out. The system administrator can unlock it. - Unlock SA Login

SQL SERVER – FIX : Error: 18486 Login failed for user ‘sa’ because the account is currently locked out. The system administrator can unlock it. – Unlock SA Login

April 23, 2009
Pinal Dave
SQL Tips and Tricks
SQL Error Messages, SQL Scripts, SQL Server Security

Error 18486 means the sa account is locked out, often after brute force attempts by hackers. Here is why it happens and how to unlock SA login.

Read More
Blue and sage bowls with terracotta rim beads beside two smaller cups on a pale tray.

FOR XML PATH: Choose Attributes and Nested Elements With Aliases

April 17, 2009
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL Server, SQL XML

FOR XML PATH interprets column aliases as directions for the output’s attributes and element hierarchy. I use three aliases to shape two rows. The source columns stay ordinary relational values.

Read More
Gouache painting: three stepping stone paths cross a meadow

geometry Line Endpoints: Preserve the Described Direction

April 15, 2009
Pinal Dave
SQL Tips and Tricks
SQL Datatype, SQL Function, SQL Scripts, SQL Server

geometry line endpoints identify the first and last described points. Reversing the same path exchanges them, while a closed line starts and ends together.

Read More
SQL SERVER - Check if Current Login is Part of Server Role Member

SQL SERVER – Check if Current Login is Part of Server Role Member

April 14, 2009
Pinal Dave
SQL Tips and Tricks
SQL Login, SQL Scripts, SQL Server, SQL Server Security

Clients sometimes forget to give me admin rights. IS_SRVROLEMEMBER(‘sysadmin’) checks if the current login is a Server Role Member: 1 means yes, 0 means no.

Read More
All the JOIN types at a glance as small red Venn diagrams: INNER, LEFT, RIGHT, FULL, the three IS NULL forms, and CROSS JOIN as 5 times 6

Introduction to JOINs in SQL Server: INNER, OUTER and CROSS JOIN

April 13, 2009
Pinal Dave
SQL Tips and Tricks
Best Practices, Database, SQL Joins, SQL Scripts, SQL User Group

This introduction to JOINs shows INNER, LEFT, RIGHT, FULL and CROSS JOIN with Venn diagrams and real results from two small tables. It also covers finding rows with no match and three traps that catch people. I first wrote it for members of the Gandhinagar SQL Server User Group.

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

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