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

Recommended Answers

All 4 Replies

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.

commented: Thanks .. +2

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

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

Dont forget the final

);

to finish off the statement.
Alistair

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.