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
How to Insert Multiple Rows in a Single SQL Query - Interview Question of the Week #069

How to Insert Multiple Rows in a Single SQL Query – Interview Question of the Week #069

May 1, 2016
Pinal Dave
SQL Interview Questions and Answers
MySQL, PostgreSQL, SQL Scripts, SQL Server

Interview question: write one script that inserts multiple rows in a single SQL query and runs unchanged in SQL Server, MySQL and PostgreSQL. Here is my answer.

Read More
MySQL - LEAST and GREATEST Comparison Operators

MySQL – LEAST and GREATEST Comparison Operators

April 19, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function, SQL Operator, SQL Scripts

Comparing values across many columns is a common chore. Here is how the MySQL LEAST and GREATEST comparison operators find the smallest and largest value.

Read More
MySQL - FOUND_ROWS() Function for Total Number of Rows Affected

MySQL – FOUND_ROWS() Function for Total Number of Rows Affected

April 15, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function, SQL Scripts

In SQL Server you get the number of rows affected with @@ROWCOUNT. In MySQL, you can find the total number of rows with FOUND_ROWS().

Read More
MySQL - Different Methods to Know Current User

MySQL – Different Methods to Know Current User

April 4, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Scripts

Why check the current user in MySQL? For audits, permissions and custom logic. Here are the methods, from user() and current_user() to mysql.user.

Read More
MySQL - How to Drop Table If Exists in Database?

MySQL – How to Drop Table If Exists in Database?

March 28, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Table Operation

SQL Server 2016 added DROP IF EXISTS, but MySQL has had it for years. Here is how to drop table if exists in a MySQL database.

Read More
MySQL - ELT() and FILED() Functions to Extract Index Position From List

MySQL – ELT() and FILED() Functions to Extract Index Position From List

March 25, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Function, SQL String

MySQL’s ELT() returns the value at a given index position in a list, and FIELD() does the reverse. Here is how both functions work, with simple examples.

Read More
MySQL - How to Generate Random Number

MySQL – How to Generate Random Number

February 6, 2016
Pinal Dave
SQL Tips and Tricks
MySQL, SQL Random

MySQL’s UUID() function returns a random 36 character value. Here is how to generate random number strings and passwords of any length from it.

Read More
Previous 1 2 3 4 5 6 7 8 … 17 Next
  • Books
  • Testimonials
  • Privacy Policy

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