954,561 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

beginning oracle

hey all pls suggest me how to start creating database and tables in oracle.

seibor
Newbie Poster
4 posts since Sep 2006
Reputation Points: 10
Solved Threads: 0
 

I dont really understand if you have a problem with starting Oracle or do you have problems with the syntax. If you encounter the problem with syntax, I can help you.
All DBMSs have keywords when you either create a database or a table, therefore use the following syntax:
If you create a database, you have to start with the keyword "create" like this;

create database database_name;

For creating tables you should use this syntax, but for this one I will use a practical example whereby I will create a Student table with the following colums (Stud_Number(primary key), Stud_Name, Date_Of_Birth, Course, Monthly_Installment).

The syntax will be as follows:

Create table Students
(Stud_Number int primary key not null,
Sud_Name char(20),
Date_Of_Birth date,
Course char(30),
Monthly_Installment double(7,2));

I hope if you use this method it will help you and reply back to let me know if the solution I have given you have worked.

Goitse
Newbie Poster
13 posts since Oct 2006
Reputation Points: 12
Solved Threads: 0
 

Have you downloaded Oracle software? Then after installation connect to the database create yourself an acount

WINDOWS
c:\> sqlplus "/as sysdba"

UNIX
$ sqlplus "/as sysdba"

SQL> create user newbie identified by manager
default tablespace users
temporary tablespace temp;

SQL> grant connect,resource to newbie;

SQL> connect newbie/manager@my_db

SQL> create table test (
id number(10),
surname varchar2(20),
dated date
);

You now have a table.

Alistair

alit2002
Junior Poster in Training
52 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3
 

SQL> create table test (
id number(10),
surname varchar2(20),
dated date

malam
Newbie Poster
1 post since Dec 2006
Reputation Points: 10
Solved Threads: 0
 

Dont forget the final

);

to finish off the statement.
Alistair

alit2002
Junior Poster in Training
52 posts since Dec 2006
Reputation Points: 10
Solved Threads: 3
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You