Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
1b158f68
Commit
1b158f68
authored
Nov 14, 2001
by
arjen@co3064164-a.bitbike.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Table names in example to singular (note from Bennett Haselton).
parent
297f653d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
Docs/manual.texi
Docs/manual.texi
+9
-9
No files found.
Docs/manual.texi
View file @
1b158f68
...
...
@@ -13024,13 +13024,13 @@ definition. If you use your keys like normal, it'll work just fine:
@example
CREATE TABLE person
s
(
CREATE TABLE person (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
name CHAR(60) NOT NULL,
PRIMARY KEY (id)
);
CREATE TABLE shirt
s
(
CREATE TABLE shirt (
id SMALLINT UNSIGNED NOT NULL AUTO_INCREMENT,
style ENUM('t-shirt', 'polo', 'dress') NOT NULL,
color ENUM('red', 'blue', 'orange', 'white', 'black') NOT NULL,
...
...
@@ -13039,24 +13039,24 @@ CREATE TABLE shirts (
);
INSERT INTO person
s
VALUES (NULL, 'Antonio Paz');
INSERT INTO person VALUES (NULL, 'Antonio Paz');
INSERT INTO shirt
s
VALUES
INSERT INTO shirt VALUES
(NULL, 'polo', 'blue', LAST_INSERT_ID()),
(NULL, 'dress', 'white', LAST_INSERT_ID()),
(NULL, 't-shirt', 'blue', LAST_INSERT_ID());
INSERT INTO person
s
VALUES (NULL, 'Lilliana Angelovska');
INSERT INTO person VALUES (NULL, 'Lilliana Angelovska');
INSERT INTO shirt
s
VALUES
INSERT INTO shirt VALUES
(NULL, 'dress', 'orange', LAST_INSERT_ID()),
(NULL, 'polo', 'red', LAST_INSERT_ID()),
(NULL, 'dress', 'blue', LAST_INSERT_ID()),
(NULL, 't-shirt', 'white', LAST_INSERT_ID());
SELECT * FROM person
s
;
SELECT * FROM person;
+----+---------------------+
| id | name |
+----+---------------------+
...
...
@@ -13064,7 +13064,7 @@ SELECT * FROM persons;
| 2 | Lilliana Angelovska |
+----+---------------------+
SELECT * FROM shirt
s
;
SELECT * FROM shirt;
+----+---------+--------+-------+
| id | style | color | owner |
+----+---------+--------+-------+
...
...
@@ -13078,7 +13078,7 @@ SELECT * FROM shirts;
+----+---------+--------+-------+
SELECT s.* FROM person
s p, shirts
s
SELECT s.* FROM person
p, shirt
s
WHERE p.name LIKE 'Lilliana%'
AND s.owner = p.id
AND s.color <> 'white';
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment