A database is primarily a file like any
other.
To create a database, you use the following formula:
CREATE DATABASE DatabaseName
The CREATE DATABASE expression is required. It
lets the SQL interpreter know that you are attempting to create a database
file. The DatabaseName factor is also required since every file in
a computer must have a name.
Compared to other languages, SQL is highly flexible
when it comes to names. Still, there are rules you must follow when naming
the objects in your databases:
- A name can start with either a letter (a, b, c, d, e, f, g, h, i, j,
k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G,
H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, or Z), a digit
(0, 1, 2, 3, 4, 5, 6, 7, 8, or 9), an underscore (_) or a non-readable
character.
Examples are _n, act, %783, Second
- After the first character (letter, digit, underscore, or symbol), the name
can have combinations of underscores, letters, digits, or symbols. Examples
are _n24, act_52_t
- A name cannot include space, that is, empty characters. If you want
to use a name that is made of various words, start the name with an
opening square bracket and end it with a closing square bracket.
Example are [Full Name] or [Date of Birth]
|