Contents / Previous / Next


Insert Data

The INSERT statement is used to insert rows with data into a table: INSERT INTO students VALUES ( 006, 'fred' ); The syntax used so far requires you to remember the order of the columns.
An alternative syntax allows to list the columns explicitly: INSERT INTO students ( id, name ) VALUES ( 006, 'fred' ); The columns need not be complete and can be in a different order.
It is considered bettter style to explicitly list the columns
than relying on the order implicitly. You could also have To load large amounts of data from text files use the COPY command: COPY workshop FROM '/home/user/data.txt';