You are here: Re: simple SQL question to insert records in an existing table - Newbie « MsSQL Server « IT news, forums, messages
Re: simple SQL question to insert records in an existing table - Newbie

Posted by Plamen Ratchev on 02/22/07 20:02

"pamela fluente" <pamelafluente@libero.it> wrote in message
news:1172172321.965386.210210@h3g2000cwc.googlegroups.com...
> Thank you all. Very helpful.
>
> the CREATE TABLE syntax is more an Oracle thing. Right?
>

Yes, using CREATE TABLE to create a table from another table works in Oracle
but not in SQL Server. In Oracle you can write:

CREATE TABLE NewTable AS
SELECT OrderID, CustomerID
FROM Source1

The equivalent in SQL Server is:

SELECT OrderID, CustomerID
INTO NewTable
FROM Source1

> I was wondering if the
> SELECT INTO
> INSERT INTO
> syntax is also accepted by Oracle or it needs adjustments ?

There is SELECT INTO in Oracle but has different meaning. The INTO clause is
used to direct the result of the SELECT to a variable list or a record.

INSERT INTO in its basic form works the same way in Oracle and SQL Server.
Oracle has more variations of the syntax.

>
> -Pam
>
>


HTH,

Plamen Ratchev
http://www.SQLStudio.com

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация