Chapter 16. Learning Basic SQL Commands

The previous chapter having explained the basics of the database design process, this chapter provides a primer on the core SQL syntax, which you will use to create and manipulate your MySQL database tables. This is a hands-on chapter, and it assumes that you are able to issue queries through the MySQL monitor on Windows or Linux/UNIX. Alternatively, if you use a GUI to MySQL, this chapter assumes you know the methods for issuing queries through those interfaces. Please note, this may not be the most exciting chapter in the book, but it will show you many functional examples of elements you'll use throughout the rest of your work.

In this chapter, you will learn

  • The basic MySQL data types

  • How to use the CREATE TABLE command to create a table

  • How to use the INSERT command to enter records

  • How to use the SELECT command to retrieve records

  • How to use basic functions, the WHERE clause, and the GROUP BY clause in SELECT expressions

  • How to select from multiple tables, using JOIN or subselects

  • How to use the UPDATE and REPLACE commands to modify existing records

  • How to use the DELETE command to remove records

  • How to use string functions built into MySQL

  • How to use date and time functions built into MySQL

Sams Teach Yourself PHP, MySQL And Apache All in One
Sams Teach Yourself PHP, MySQL and Apache All in One (3rd Edition)
ISBN: 0672328739
EAN: 2147483647
Year: 2004
Pages: 327 © 2008-2017.
If you may any questions please contact us: