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 - Running Batch File Using T-SQL - xp_cmdshell bat file

SQL SERVER – Running Batch File Using T-SQL – xp_cmdshell bat file

June 27, 2007
Pinal Dave
SQL Tips and Tricks
Computer Network, SQL Scripts, SQL Utility

What is xp_cmdshell used for, and how do you run a batch file using T-SQL? Examples run a system command, a plain BAT file and one with a parameter.

Read More
Numbered wooden tables arranged in rows inside a database drum.

SQL SERVER – 2005 List All Tables of Database

June 26, 2007
Pinal Dave
SQL Tips and Tricks
SQL Scripts, SQL System Table

The simple way to list all tables of a database in SQL Server 2005: select from sys.tables to get every table that users have created.

Read More
SQL SERVER - Explanation and Example Four Part Name

SQL SERVER – Explanation and Example Four Part Name

June 26, 2007
Pinal Dave
SQL Tips and Tricks

What is a four part name in SQL Server? It is ServerName.DatabaseName.DatabaseOwner.TableName, for example localhost.AdventureWorks.Person.Contact.

Read More
SQL SERVER - Repeate String N Times Using String Function REPLICATE

SQL SERVER – Repeate String N Times Using String Function REPLICATE

June 25, 2007
Pinal Dave
SQL Tips and Tricks
SQL Function, SQL Scripts, SQL String

REPLICATE repeats a string N times. I found this T-SQL string function while searching for replication, and it is handy when you need repeated text.

Read More
Two identical white enamel jugs side by side on a shelf, one completely empty and one holding a single measure of water.

SQL SERVER – Explanation and Comparison of NULLIF and ISNULL

June 22, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL Function, SQL NULL, SQL Scripts, SQL Server

NULLIF returns NULL when two expressions are equal and the first one when they are not. Here is how it compares with ISNULL and the matching CASE expression.

Read More
Three red ribbons on a sail, two streaming smoothly and one fluttering upward, a hand ready on the rope.

A Simple Dashboard From DMVs

June 21, 2007
Pinal Dave
SQL Tips and Tricks
DBA, SQL DMV, SQL Monitoring, SQL Wait Stats

A dashboard from DMVs can show live requests, database state, waits, and backups when its queries refresh without adding load.

Read More
Gouache painting of three differently shaped hourglasses on a stone garden wall, the middle one with red sand

Current Date and Time in SQL Server: GETDATE, SYSDATETIME and More

June 21, 2007
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Function, SQL Scripts

You can read the current date and time in SQL Server in eight ways, and they differ in precision and time zone. This post runs them side by side, shows that each one is evaluated once per statement, and picks the right one for defaults, audit columns and reports.

Read More
Previous 1 … 547 548 549 550 551 552 553 … 570 Next
  • Books
  • Testimonials
  • Privacy Policy

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