Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL server-> Oracle query

Status
Not open for further replies.

sunshine9

Programmer
Aug 1, 2002
21
US
Hello,
I'm trying to create a database and table in oracle that is identical to one i have in sql srvr2000. I am not familiar at all with oracle. Can someone pls tell me how to convert this into oracle sql?

CREATE DATABASE mydb
ON PRIMARY
(
NAME = mydb,
FILENAME = 'c:\program files\microsoft sql server\mssql\data\mydb.mdf',
SIZE = 10MB,
FILEGROWTH = 25%
)
GO

BEGIN TRANSACTION

use mydb
GO

/* define the table */
CREATE TABLE dbo.mytable
(
a nvarchar(256) NULL,
mydate datetime NULL,
f numeric(18, 0) NULL,
) ON [PRIMARY]

commit

thanks in advance..

 
1. Do you have ORACLE installed and do you have at least a dummy/initial database?

2. If you do, do you have a user account?

3. If so, log into that account, create a script with this command in it:

CREATE TABLE mytable
(a varchar2(256),
mydate date NULL,
f number(18)
);

Every account has a default tablespace. This table will go there unless you add this to the script:

...
TABLESPACE <tablespace name>
;

That will get you started with a table using default storage parameters. You can really tune the table storage characteristics in ORACLE if necessary.

Good Luck.
&quot;Helping others to help themselves...&quot;
=================================
Thomas V. Flaherty Jr.
Birch Hill Technology Group, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top