Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

[GENERAL] insert into...

From: Alain Roger <raf.news(at)gmail.com>
Date: Sun Dec 09 2007 - 11:05:15 EST


Hi,

i would like to understand why the following INSERT INTO statement works :

INSERT INTO mytable

   SELECT nextval('my_sequence'),
'myname',
'myfirstname'

;

whereas usually we should do :

INSERT INTO mytable
VALUES
(

   SELECT nextval('my_sequence'),
'myname',
'myfirstname'

);

thanks a lot,

-- 
Alain
------------------------------------
Windows XP SP2
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008
Received on Sun Dec 9 11:06:10 2007
Do you need help?X

This archive was generated by hypermail 2.1.8 : Mon Jun 16 2008 - 21:40:42 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library