Now that you've defined a table, you can add data to it. MySQL will keep track of all the details. To manipulate data, use the Structured Query Language (SQL) commands. Because it's been designed to easily describe the relationship between tables and rows, the database uses SQL to modify data in tables.
SQL is a standard language used with any database such as MySQL, Oracle, or Microsoft SQL Server. It was developed specifically as a language used to retrieve, add, and manipulate data that resides in databases. We'll get into the nitty gritty of MySQL in Chapter 8, but we'll start with some easy-to-use commands. We're going to start with creating tables.
Each database adds on its own extensions to the standard SQL. These are usually more advanced capabilities, such as an outer join. An outer join is a special way of linking two tables so that data from one of the tables is included even if there isn't a match in the other table. The syntax for outer joins for tables in Oracle is a plus within parentheses
(+), whereas MySQL uses the syntax
left join on to perform an outer table join.
command to specify the structure of new database tables. When you create a database table, each column has a few options, in addition to the column names and data types. Values that must be supplied when adding data to a table use the
NOT NULL keyword. The
PRIMARY KEY keyword tells MySQL which column to use as a key field. Then, you have ...