MySQL in a Nutshell


When you need to find the right SQL keyword or MySQL client command-line option right away, turn to this convenient reference, known for the same speed and flexibility as the system it covers so thoroughly. MySQL is packed with so many capabilities that the odds of remembering a particular function or statement at the right moment are pretty slim. With MySQL in a Nutshell, you get the details you need, day in and day out, in one concise and extremely well organized book.

The new...

See more details below
Paperback (Second Edition)
$26.38 price
(Save 24%)$34.99 List Price

Pick Up In Store

Reserve and pick up in 60 minutes at your local store

Other sellers (Paperback)
  • All (23) from $1.99   
  • New (8) from $13.22   
  • Used (15) from $1.99   
MySQL in a Nutshell

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$15.49 price
(Save 44%)$27.99 List Price


When you need to find the right SQL keyword or MySQL client command-line option right away, turn to this convenient reference, known for the same speed and flexibility as the system it covers so thoroughly. MySQL is packed with so many capabilities that the odds of remembering a particular function or statement at the right moment are pretty slim. With MySQL in a Nutshell, you get the details you need, day in and day out, in one concise and extremely well organized book.

The new edition contains all the commands and programming information for version 5.1, including new features and language interfaces. It's ideal for anyone using MySQL, from novices who need to get up to speed to advanced users who want a handy reference. Like all O'Reilly Nutshell references, it's easy to use and highly authoritative, written by the editor of the MySQL Knowledge Base at MySQL AB, the creator and owner of MySQL.

Inside, you'll find:

  • A thorough reference to MySQL statements, functions, and administrative utilities
  • Several tutorial chapters to help newcomers get started
  • Programming language APIs for PHP, Perl, and C
  • Brief tutorials at the beginning of each API chapter to help anyone, regardless of experience level, understand and master unfamiliar territory
  • New chapters on replication, triggers, and stored procedures
  • Plenty of new examples of how MySQL is used in practice
  • Useful tips to help you get through the most difficult subjects
Whether you employ MySQL in a mission-critical, heavy-use environment or for applications that are more modest, this book puts a wealth of easy-to-find information at your fingertips, saving you hundreds of hours of trial and error and tedious online searching. If you're ready to take advantage of everything MySQL has to offer, MySQL in a Nutshell has precisely what it takes.
Read More Show Less

Product Details

  • ISBN-13: 9780596514334
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 4/1/2008
  • Series: In a Nutshell (O'Reilly) Series
  • Edition description: Second Edition
  • Edition number: 2
  • Pages: 545
  • Sales rank: 1,428,663
  • Product dimensions: 6.00 (w) x 9.00 (h) x 1.14 (d)

Meet the Author

Russell Dyer is a freelance writer specializing in MySQL database software and is the editor of the MySQL Knowledge Base (​se.html). He is the author of MySQL in a Nutshell ( and has writen articles for several magazines: Dev Zone (a MySQL publication), Linux Journal,, The Perl Journal, Red Hat Magazine, SysAdmin Magazine, Tech Republic, Unix Review, and He has also finished his first novel, "In Search of Kafka". More information on Russell, along with a list of his published articles with links to them, can be found on his web site at

Read More Show Less

Table of Contents


Introduction and Tutorials

Chapter 1: Introduction to MySQL

Chapter 2: Installing MySQL

Chapter 3: MySQL Basics

SQL Statements and Functions

Chapter 4: Security and User Statements and Functions

Chapter 5: Database and Table Schema Statements

Chapter 6: Data Manipulation Statements and Functions

Chapter 7: Table and Server Administration Statements and Functions

Chapter 8: Replication Statements and Functions

Chapter 9: Stored Routines Statements

Chapter 10: Aggregate Clauses, Aggregate Functions, and Subqueries

Chapter 11: String Functions

Chapter 12: Date and Time Functions

Chapter 13: Mathematical Functions

Chapter 14: Flow Control Functions

MySQL Server and Client Tools

Chapter 15: MySQL Server and Client

Chapter 16: Command-Line Utilities

APIs and Connectors

Chapter 17: C API

Chapter 18: Perl API

Chapter 19: PHP API


Data Types


Server and Environment Variables


Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star


4 Star


3 Star


2 Star


1 Star


Your Rating:

Your Name: Create a Pen Name or

Barnes & Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation


  • - By submitting a review, you grant to Barnes & and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Terms of Use.
  • - Barnes & reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 2 Customer Reviews
  • Anonymous

    Posted May 8, 2005

    you need a background in SQL

    Well the book certainly seems to cover MySQL's features quite comprehensively. But, as it is a reference manual, it does not attempt to teach you MySQL or the theory of relational databases. For a given MySQL command, the book's explanation is succinct and useful. Provided you already have a background in the area. Much of the book's discussion is probably already available in equivalent form in the online help. But hardcopy is nice to have. Going through the functions, what you might appreciate about MySQL is that many of these are generic SQL functions. If you come from any other SQL implementation, your background will be relevant to much of the book.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted June 3, 2005

    Sometimes You Feel Like a

    I have a few `Nutshell¿ books in my library, and have found them to be a source I refer to time and time again. So, when I saw that O¿Reilly had released a `Nutshell¿ book on MySQL, I headed on over to my local bookstore and spent some time in a high-back chair perusing it¿s pages. Don¿t let the size of the book fool you. The information it contains is well laid out into identifiable topics for easy reference. Since I have acquired this book, I have been able to find desired functions, statements and utilities more easily than before. Lately, I am spending a considerable amount of my time tuning and optimizing SQL queries that appear throughout a large PHP application I am designing. I initially wrote the queries months ago, but with my newfound reference in hand, I have been able to significantly reduce the amount of execution time each query takes. One of the book¿s pleasant surprises was the section regarding flow control functions, which lets me take my SQL query functionality far beyond where it ever has been. The book also includes chapters on PERL, PHP and C APIs, which prove to be very readable. This little powerhouse packs a punch. I definitely recommend ¿MySQL in a Nutshell, A Desktop Quick Reference by Russell J.T. Dyer¿ to anyone developing applications that interface with MySQL, or to anyone who wants to get to know MySQL better. -Brett Berry PERL/PHP/JavaScript/MySQL

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 2 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)