|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Multiple inserts in one statement
Given a simple table (called simple_table)
id int name varchar state char in MySQL, you can use INSERT INTO simple_table(id, name) VALUES (1, 'Fred'), (2, 'John'), (3, 'Mary')...... ...etc to add multiple entries with one statement. Is there a comparable way to do this in Postgres? The above syntax doesn't seem to work (Postgres 7.1.2) Any takers? Kyuzo |
|
#2
|
||||
|
||||
|
__________________
My blog Tutorials about OSS databases, DBMonster ... Contribute to OSS Development, fill bug reports! Developer Shed eSupport Commented my.ini/my.cnf (ADD YOUR OWN CONFIG TRICK) An introduction to database normalization Natural or Surrogate key Custom ordering for your results Correlated and uncorrelated subqueries Don't turn your outer joins into inner joins Random data (with a bias) |
|
#3
|
|||
|
|||
|
So, the answer is no, but you probably shouldn't do that anyway since its a non-standard extension that MySQL provides.
|
![]() |
| Viewing: Dev Shed Forums > Databases > PostgreSQL Help > Multiple inserts in one statement |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|