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
MySQL - Finding First day and Last day of a Month

First Day and Last Day of a Month in MySQL and SQL Server

April 9, 2014
Pinal Dave
SQL Tips and Tricks
MySQL, SQL DateTime, SQL Function, SQL Server

Finding the first day and last day of a month in MySQL takes LAST_DAY and a little date arithmetic. This post checks leap years and timestamp filters, then repeats the task in SQL Server with EOMONTH and DATETRUNC, tested on SQL Server 2025.

Read More
The query SELECT @@system_time_zone; with its result, a single row with the column @@system_time_zone and the value India Standard Time

Time Zone Name in MySQL: How to Detect the Current One

February 16, 2014
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Command, SQL DateTime

Need the current time zone of the MySQL server you are connected to? One simple query with @@system_time_zone returns the time zone name.

Read More
Time Zone name dialog.

SQL SERVER – Get Current TimeZone Name in SQL Server

February 15, 2014
Pinal Dave
SQL Tips and Tricks
SQL DateTime

What is the current TimeZone of the server where SQL Server is installed? Here is the short xp_regread script I use to read it.

Read More
MySQL - When to Use TIMESTAMP or DATETIME - Difference Between TIMESTAMP or DATETIME

MySQL – When to Use TIMESTAMP or DATETIME – Difference Between TIMESTAMP or DATETIME

February 14, 2014
Pinal Dave
SQL Tips and Tricks
MySQL, SQL DateTime

Confused about TIMESTAMP or DATETIME in MySQL? I explain the two factors, starting with supported range, that help you decide which one to use.

Read More
Old curtains hung in a new home's window after a move, ending a hand's width short of the sill.

Checking Data Type Mapping After a Database Migration

January 21, 2014
Pinal Dave
SQL Tips and Tricks
Compatibility Level, DBA, SQL Datatype, SQL DateTime, SQL Migration

Audit data type mapping after migration, compare counts and checksum screens, inspect length and precision, and reconcile changed values.

Read More
An egg carton with some empty cups kept in place and one red painted egg

Counting Rows per Month With Zero-Filled Gaps

January 1, 2014
Pinal Dave
SQL Tips and Tricks
SQL DateTime, SQL Joins, SQL Reports, SQL Server

Build monthly counts with zero-filled gaps, generate a complete month range, and retain empty categories through a reporting scaffold.

Read More
A boat keel with boards aligned along it and another small group lying crosswise

Clustered Key Choice for Date Range Queries: Date or Identity

December 14, 2013
Pinal Dave
SQL Tips and Tricks
Clustered Index, SQL DateTime, SQL Identity, SQL Index

Should you cluster on OrderDate? Measure one month of orders on three designs and see what each one costs in reads before you rebuild a table.

Read More
Previous 1 … 10 11 12 13 14 15 16 … 30 Next
  • Books
  • Testimonials
  • Privacy Policy

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