SQL
Populating a Table with Rows
The insert statement is used to populate a table with rows:  
```sql
INSERT INTO weather
VALUES ('San Francisco', 46, 50, 0.25, '1994-11-27');
```  
Constants that are not numeric values (e.g., text and dates) must be surrounded by single quotes (` ''`), as in the example. Input dates for the date type must be formatted as `'YYYY-MM-DD'`.  
We can insert into the `cities` table in the same manner.  
```sql
INSERT INTO cities
VALUES ('San Francisco', -194.0, 53.0);
```  
The syntax used so far requires you to remember the order of the columns. An alternative syntax allows you to list the columns explicitly:  
```sql
INSERT INTO weather (city, temp_lo, temp_hi, prcp, date)
VALUES ('San Francisco', 43, 57, 0.0, '1994-11-29');
```  
You can list the columns in a different order if you wish or even omit some columns, e.g., if the `prcp` is unknown:  
```sql
INSERT INTO weather (date, city, temp_hi, temp_lo)
VALUES ('1994-11-29', 'Hayward', 54, 37);
```  
> **Tip.  ** Many developers consider explicitly listing the columns better style than relying on the order implicitly.  
Please enter all the commands shown above so you have some data to work with in the following sections.  
Alternatively, you can use the `COPY` statement. This is faster for large amounts of data because the `COPY` command is optimized for bulk loading while allowing less flexibility than `INSERT`. An example with [`weather.csv`](https://duckdb.org/data/weather.csv) would be:  
```sql
COPY weather
FROM 'weather.csv';
```  
Where the file name for the source file must be available on the machine running the process. There are many other ways of loading data into DuckDB, see the [corresponding documentation section](#docs:data:overview) for more information.