Database Reference
In-Depth Information
21
Creating and Manipulating
Tables
In this chapter you learn the basics of table creation, alteration, and deletion.
Creating Tables
MariaDB SQL statements are not used just for table data manipulation. Indeed,
SQL statements can be used to perform all database and table operations,
including the creation and manipulation of tables themselves.
There are generally two ways to create database tables:
Using an administration tool (like the ones discussed in Chapter 2,
“Introducing MariaDB”) that can be used to create and manage data-
base tables interactively.
Tables may also be manipulated directly with MariaDB SQL
statements.
To create tables programmatically, the CREATE TABLE SQL statement is used.
It is worth noting that when you use interactive tools, you are actually using
MariaDB SQL statements. Instead of your writing these statements, however,
the interface generates and executes the SQL seamlessly for you (the same is
true for changes to existing tables).
Tip
Additional Examples For additional examples of table creation scripts, see the code
used to create the sample tables used in this topic.
 
 
 
Search WWH ::




Custom Search