Database Reference
In-Depth Information
| 110 | Cathartiformes |
| 111 | Phoenicopteriformes |
| 112 | Falconiformes |
| 113 | Gruiformes |
| 114 | Pteroclidiformes |
| 115 | Columbiformes |
| 116 | Psittaciformes |
| 117 | Cuculiformes |
| 118 | Opisthocomiformes |
| 119 | Strigiformes |
| 120 | Struthioniformes |
| 121 | Tinamiformes |
| 122 | Caprimulgiformes |
| 123 | Apodiformes |
| 124 | Coraciiformes |
| 125 | Piciformes |
| 126 | Trogoniformes |
| 127 | Coliiformes |
| 128 | Passeriformes |
+----------+---------------------+
Now let's enter one hefty INSERT statement to insert a bunch of bird families into the
bird_families table. We just list each set of data within its own parentheses, separ-
ated by commas. After consulting our bird-watching guides, we determine which families
belong to which orders and then enter this in the mysql client:
INSERT INTO bird_families
( scientific_name , order_id )
VALUES ( 'Charadriidae' , 109 ),
( 'Laridae' , 102 ),
( 'Sternidae' , 102 ),
( 'Caprimulgidae' , 122 ),
( 'Sittidae' , 128 ),
( 'Picidae' , 125 ),
( 'Accipitridae' , 112 ),
( 'Tyrannidae' , 128 ),
( 'Formicariidae' , 128 ),
( 'Laniidae' , 128 );
This statement enters 10 rows of data in one batch. Notice that we didn't have to list the
names of the columns for each row. Notice also that we didn't mention the family_id
column in this SQL statement. The server will assign automatically the next number in the
column's sequence for that field. And we didn't give the statement any text for the
brief_description column. We can enter that later if wewant.
Search WWH ::




Custom Search