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 pamela fluente on 02/26/07 08:22

On 22 Feb, 21:02, "Plamen Ratchev" <Pla...@SQLStudio.com> wrote:
> "pamela fluente" <pamelaflue...@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 Ratchevhttp://www.SQLStudio.com

Thank you. Very useful.

-Pam

 

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

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