Home » SQL & PL/SQL » SQL & PL/SQL » EMP and DEPT Tables
EMP and DEPT Tables [message #207083] Mon, 04 December 2006 02:03 Go to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

hi...

can someone post the stucture and the values of the default EMP and DEPT table in oracle 9i....i accidently dropped those 2 tables .... and i don't remember the structure of it..

Thanks
Re: EMP and DEPT Tables [message #207086 is a reply to message #207083] Mon, 04 December 2006 02:07 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi
if you by mistake drop ur tables and you can create again just run demo script for those tables.

check.
oracle/ora90/demo folder here you get script for all scott schema tables.
on sqlprompt
sql>@give_complete_script_path


hope this helps
Taj
Re: EMP and DEPT Tables [message #207088 is a reply to message #207086] Mon, 04 December 2006 02:15 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

user52 wrote on Mon, 04 December 2006 02:07
hi
if you by mistake drop ur tables and you can create again just run demo script for those tables.

check.
oracle/ora90/demo folder here you get script for all scott schema tables.
on sqlprompt
sql>@give_complete_script_path


hope this helps
Taj


no...i don't have any emp or dept table there now..

[Updated on: Mon, 04 December 2006 02:15]

Report message to a moderator

Re: EMP and DEPT Tables [message #207090 is a reply to message #207088] Mon, 04 December 2006 02:17 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi,
there no emp or dept tables.

there you find script. this script create all tables for scott schema. ( including emp or dept tables)



regards
Taj
Re: EMP and DEPT Tables [message #207091 is a reply to message #207090] Mon, 04 December 2006 02:21 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

user52 wrote on Mon, 04 December 2006 02:17
hi,
there no emp or dept tables.

there you find script. this script create all tables for scott schema. ( including emp or dept tables)



regards
Taj



but how can u give complete script path if i don't even have the schema for those tables....?
Re: EMP and DEPT Tables [message #207094 is a reply to message #207091] Mon, 04 December 2006 02:30 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi ,

In Oracle 9i database in oracle/ora90/demo folder have scott schema tables script if you find this script then go sqlprompt.


sql>conn scott/tiger ( if you have scott user that is ok if you used any other user just logon ur own user.)

connected
sql>@d:\oracle\ora90\demp\script.sql <enter> hit enter.


the above script create all tables.

hope this clear
taj

user or schema is similar no difference between.

user = schema

Re: EMP and DEPT Tables [message #207095 is a reply to message #207091] Mon, 04 December 2006 02:35 Go to previous messageGo to next message
Admin@Lightsql.Com
Messages: 36
Registered: November 2006
Member

cooler2005 wrote on Mon, 04 December 2006 02:21
user52 wrote on Mon, 04 December 2006 02:17
hi,
there no emp or dept tables.

there you find script. this script create all tables for scott schema. ( including emp or dept tables)



regards
Taj



but how can u give complete script path if i don't even have the schema for those tables....?


You will have schema called scott. If not, create the user scott and assign pwd as tiger.

The script path is windows directory/file path.

Path and schema are entriely different.

Jay
Fun Programming with Oracle & Visual C++, Author of http://www.lightsql.com.
Re: EMP and DEPT Tables [message #207103 is a reply to message #207083] Mon, 04 December 2006 02:55 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

guys guys

i have the user as scott...

i know about it...

but u are saying that the folder has scott schema tables script ...i can't seem to find that out....
i have attached my schema folder as a jpeg.....have a loook


and i am using oracle 9i "ora92"
  • Attachment: sql.JPG
    (Size: 65.29KB, Downloaded 513 times)
Re: EMP and DEPT Tables [message #207104 is a reply to message #207103] Mon, 04 December 2006 02:58 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
What does the readme.txt say?
Re: EMP and DEPT Tables [message #207105 is a reply to message #207103] Mon, 04 December 2006 02:59 Go to previous messageGo to next message
Mohammad Taj
Messages: 2412
Registered: September 2006
Location: Dubai, UAE
Senior Member

hi,

go human_resources.

you will get hr_cre.sql, hr_p*.sql first run hr_cre.sql then after hr_p*.sql


hope this helps
Taj

Re: EMP and DEPT Tables [message #207106 is a reply to message #207105] Mon, 04 December 2006 03:01 Go to previous messageGo to next message
Frank
Messages: 7880
Registered: March 2000
Senior Member
Google for demobld.sql This file contains the original emp/dept creation scripts
Re: EMP and DEPT Tables [message #207107 is a reply to message #207104] Mon, 04 December 2006 03:02 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

Frank wrote on Mon, 04 December 2006 02:58
What does the readme.txt say?


this is the readme.txt file

--------------------------------------------------------------------------------------

README.txt

Version 9.2.0

Created 14-JUL-2000
Updated 03-APR-2001
Updated 21-JAN-2002

--------------------------------------------------------------------------------------



This document describes the structure of the Schema directory, instructions for
creating the schemas.



==============================================

1. Structure of the Schemas directory

==============================================



The Schema directory contains the following files and sub-folders:



schema

mksample.sql -- script that erases all Sample Schemas and recreates them
CAUTION: This script contains directory paths that might
only suit one specific installation.

mk_dir.sql -- script that sets the DIRECTORY objects. This script is
invoked during database creation by the Database
Configuration Assistant (DBCA)
CAUTION: This script contains directory paths that might
only suit one specific installation.

README.txt -- explains the process of creating schemas


The following folders contain scripts to drop and create database objects, load
data.

human_resources -- hr_main.sql creates or recreates the schema
-- hr_drop.sql drops all objects, but not the user

order_entry -- oe_main.sql creates or recreates the whole OE schema
-- oe_drop.sql drops all relational objects, but not the
user
-- oc_main.sql creates the OC subschema and is called by
oe_main.sql (OC stands for Online Catalog)
-- oc_srop.sql drops all the object-relational parts of
the OC subschema

product_media -- pm_main.sql creates or recreates the PM schema
-- pm_drop.sql drops all objects, but not the user

shipping -- qs_main.sql creates or recreates the QS schema
(QS stands for Queued Shipping)
-- qs_drop.sql drops all objects, but not the user

sales_history -- sh_main.sql creates or recreates the SH schema
-- sh_drop.sql drops all objects, but not the user


===================================================

2. Instructions to create the schemas:

===================================================

1) Decide on passwords for the Sample Schemas. For illustration purposes,
let's assume the passwords are:
SYSTEM: TWEETY2or1
SYS: TAHITY9or4
HR: H19
OE: O34
PM: P94
QS: Q12
SH: S87
NOTE: Please make sure to use your own, secret passwords

2) Invoke the Sample Schema creation script:
SQL> @?/demo/schema/mksample TWEETY2or1 TAHITY9or4 H19 O34 P94 Q12 S87

3) The first 4 Sample Schemas take little time to be created. The
SH schema takes about 30 to 45 minutes to complete.

4) At the end of the mksample script, the data dictionary is queried to
list all objects created.

===================================================

3. Schema dependencies and requirements:

===================================================

The HR schema does not require any other schema other than SYS and SYSTEM to
be present. Nor does the HR schema use datatypes od objects more recent than
Oracle8i

The OE schema requires the database to be enabled for spatial data.

The PM schema requires the database to be enabled for Intermedia, which in
turn requires a java-enabled database.

The SH schema uses Partitioning.

Please refer to the Oracle9i Documentation for more detailed information
about the Oracle9i Sample Schemas.


===================================================

4. Known bugs

===================================================
Re: EMP and DEPT Tables [message #207108 is a reply to message #207105] Mon, 04 December 2006 03:03 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

user52 wrote on Mon, 04 December 2006 02:59
hi,

go human_resources.

you will get hr_cre.sql, hr_p*.sql first run hr_cre.sql then after hr_p*.sql


hope this helps
Taj




i don't have hr_p*.sql in the folder...just hr_cre.sql is there...
Re: EMP and DEPT Tables [message #207110 is a reply to message #207083] Mon, 04 December 2006 03:06 Go to previous messageGo to next message
Maaher
Messages: 7062
Registered: December 2001
Senior Member
cooler2005 wrote on Mon, 04 December 2006 09:03
hi...

can someone post the stucture and the values of the default EMP and DEPT table in oracle 9i....i accidently dropped those 2 tables .... and i don't remember the structure of it..

Thanks
I posted the scripts quite some time ago:
Link

MHE
icon14.gif  Re: EMP and DEPT Tables [message #207111 is a reply to message #207106] Mon, 04 December 2006 03:08 Go to previous messageGo to next message
cooler2005
Messages: 50
Registered: October 2006
Location: India
Member

Frank wrote on Mon, 04 December 2006 03:01
Google for demobld.sql This file contains the original emp/dept creation scripts


thanks thanks

got it from here http://www.oracle.com/technology/sample_code/tech/sql_plus/htdocs/demobld.html

thanks a lot all...
Re: EMP and DEPT Tables [message #599597 is a reply to message #207083] Sat, 26 October 2013 13:16 Go to previous messageGo to next message
anilkvm
Messages: 1
Registered: October 2013
Junior Member
Here is the script for both emp and dept table.

[Edit MC: removed copyrighted material]

[Updated on: Sat, 26 October 2013 14:16] by Moderator

Report message to a moderator

Re: EMP and DEPT Tables [message #599598 is a reply to message #599597] Sat, 26 October 2013 13:20 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3122
Registered: May 2013
Location: World Wide on the Web
Senior Member
1. Why do you have to explicitly do that when the schema has pre-built .sql script?
2. Why do you have to reply to such a zombie thread which is almost 7 years old Shocked
Re: EMP and DEPT Tables [message #599599 is a reply to message #599598] Sat, 26 October 2013 13:26 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
1. Probably because he couldn't do that implicitly.
2. So what? Does replying to an old question affect global warming differently than posting a reply to a recent question?
Re: EMP and DEPT Tables [message #599600 is a reply to message #599599] Sat, 26 October 2013 13:38 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3122
Registered: May 2013
Location: World Wide on the Web
Senior Member
1. OP did it using demobld.sql scripts. May be anilkvm didn't figure it out.
2. What to say about that? No more comments.
Re: EMP and DEPT Tables [message #599603 is a reply to message #599600] Sat, 26 October 2013 13:50 Go to previous messageGo to next message
Littlefoot
Messages: 20901
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Just as an example, compare @anilkvm's first message with yours. You posted a question; it was not formatted, you didn't use [code] tags. His first attempt was an answer; true, to an old question, unformated, without [code] tags. That script would fail on my database anyway (different NLS settings), but we should give a new member some credits. It takes some time to figure out how certain forum works, what kind of messages are well accepted and which are not. Therefore, back to your beginning here: reply you got was a kind one (what else would you expect from Barbara?), and you certainly didn't feel hurt. What do you think, how did @anilkvm feel after your reply to his attempt? Chill out!
Re: EMP and DEPT Tables [message #599604 is a reply to message #599603] Sat, 26 October 2013 13:59 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3122
Registered: May 2013
Location: World Wide on the Web
Senior Member
No problem, I am always chill Smile

Regarding the first post, I corrected using code tags and posted again, that too it was not a code, it was a sqlldr outtput( hope you are referring to the multithreading related question).

And regarding anilkvm's reply, not everybody has responded the way you have suggested now. Some moderators say don't do this/that, few moderators would say that's ok, a few moderators would do that themselves.

I didn't realize it's anilkvm's first post, I hope he is not hurt in anyway. My intention was to remind him about the automated script already available for such tasks. And I am sorry if it has hurt anyone. I don't want to spoil anybody's happy mood in the weekend Smile

And +1 for this :
Littlefoot wrote on Sun, 27 October 2013 00:20

we should give a new member some credits. It takes some time to figure out how certain forum works, what kind of messages are well accepted and which are not.


[Updated on: Sat, 26 October 2013 14:04]

Report message to a moderator

Re: EMP and DEPT Tables [message #599611 is a reply to message #599604] Sat, 26 October 2013 14:27 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
And regarding anilkvm's reply, not everybody has responded the way you have suggested now. Some moderators say don't do this/that, few moderators would say that's ok, a few moderators would do that themselves.


And you are not a moderator (and don't want to ever be one as you said), so refrain yourself (about 20 or 30 times I told you so).
Moderators moderate, not moderators do NOT moderate.
Many times you said you agree with this, many times you said you will no more do it, many times you still do it.

So
1. Do not moderate, that is do not talk about the form of a question, only to the question itself.
2. Do not repeat what others said in the same topic
3. Do not blablabla, like this last post.

If we'd remove those of your posts that do not satisfy these points and those you requested to be removed then we'd remove 90% of your posts.

[Updated on: Sat, 26 October 2013 14:28]

Report message to a moderator

Re: EMP and DEPT Tables [message #599615 is a reply to message #599611] Sat, 26 October 2013 16:00 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3122
Registered: May 2013
Location: World Wide on the Web
Senior Member
Michel Cadot wrote on Sun, 27 October 2013 00:57

you are not a moderator (and don't want to ever be one as you said)


Yes, I promise, and, as I already said after so many unwanted conflicts with you especially(and nobody else), I never ever want to become a moderator in this OraFAQ forum. I will just keep doing my work without any credibility. Oh yes, by the way, being a moderator is not about credibility, it's a responsibility.

I have had a lot of conversation with many other moderators, and it is not the same experience with you, no, never. Littlefoot never told me to shut up or refrain myself from posting. And you say my 90% posts should be deleted? Why? Just prove it Michel. And I will completely refrain myself from even logging into this forum.

So, don't worry Michel. One day I will silently go away from here, you keep your words with you. THANK YOU.

Regards,
Lalit
icon13.gif  Re: EMP and DEPT Tables [message #599626 is a reply to message #599615] Sun, 27 October 2013 02:12 Go to previous messageGo to next message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
And you say my 90% posts should be deleted? Why? Just prove it Michel.


Proof: Just this one and the previous one in the topic.
Other proof: take all topics where your post is the last one, none is about the question, it is just a comment from you that no one cares, they are just boring or irritating.

Quote:
I have had a lot of conversation with many other moderators, and it is not the same experience with you, no, never. Littlefoot never told me to shut up or refrain myself from posting.


Hmmm, what about Littlefoot's answer to you?
They did not tell you that DIRECTLY (I am the only one to do that as I don't care about "% correct" language) but I bet this was implied but you don't understand what is not clearly put in words, and even then you don't.

Quote:
One day I will silently go away from here


Silently! ./fa/449/0/
It is impossible for you but surely I'd love to (not) see that. Razz

Michel

P.S. I suspect the last part of your last sentence is the grand finale of your post but, sorry, I don't understand this expression, too bad.

Laughing

Re: EMP and DEPT Tables [message #599628 is a reply to message #599626] Sun, 27 October 2013 02:35 Go to previous messageGo to next message
pablolee
Messages: 2836
Registered: May 2007
Location: Scotland
Senior Member
Playtime is over, back to work. Topic locked.
icon14.gif  Re: EMP and DEPT Tables [message #599629 is a reply to message #599628] Sun, 27 October 2013 02:47 Go to previous message
Michel Cadot
Messages: 64152
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Thanks.

Previous Topic: Getting Hostname,systimestamp over db link
Next Topic: How to get department wise effective rate
Goto Forum:
  


Current Time: Sat Dec 10 09:22:21 CST 2016

Total time taken to generate the page: 0.08773 seconds