我在哪里可以获得默认 Oracle 的“HR”模式的 SQL?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2452923/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-10 02:28:35  来源:igfitidea点击:

Where can I get SQL for default Oracle's "HR" schema?

oracle

提问by Dmitry

I'm studying Oracle database and have to do some exercises with default "HR" schema. But I think that data in my tables is changed from default values (many students have access to DB and may be someone changed data). Where can I get SQL to construct default "HR" schema?

我正在学习 Oracle 数据库,并且必须使用默认的“HR”模式做一些练习。但是我认为我的表中的数据是从默认值更改的(许多学生可以访问数据库,并且可能是有人更改了数据)。我在哪里可以得到 SQL 来构建默认的“HR”模式?

回答by Harshal Malshe

Just wanted to update this post that the above link won't work:

只是想更新这个帖子,上面的链接不起作用:

Try this instead: http://www.oracle.com/technetwork/developer-tools/datamodeler/sample-models-scripts-224531.html

试试这个:http: //www.oracle.com/technetwork/developer-tools/datamodeler/sample-models-scripts-224531.html

And refer this also: http://st-curriculum.oracle.com/obe/jdev/obe11jdev/11/common/connection11g.htm#t1

并参考这个:http: //st-curriculum.oracle.com/obe/jdev/obe11jdev/11/common/connection11g.htm#t1

Hope this helps!!

希望这可以帮助!!

回答by jana

If practicing using HR Schema is your requirement, you can use the Oracle Live SQL. It has the HR Schema for you to play around with.

如果您需要练习使用 HR Schema,则可以使用 Oracle Live SQL。它有 HR Schema 供您使用。

https://livesql.oracle.com

https://livesql.oracle.com

回答by Christian Shay

Old question but high Google page rank, so here goes:

老问题,但谷歌页面排名很高,所以这里是:

They are hosted by Oracle on Github now (as of 2018): https://github.com/oracle/db-sample-schemas

它们现在由 Oracle 在 Github 上托管(截至 2018 年):https: //github.com/oracle/db-sample-schemas

回答by Arun Kumar

I was working on a database connected via SQL developer and could not find HR schema. I wanted to create the HR schema using SQL queries. I used below scripts one by one and create the schema with the SYS user:

我正在处理通过 SQL 开发人员连接的数据库,但找不到 HR 模式。我想使用 SQL 查询创建 HR 模式。我一一使用了以下脚本,并使用 SYS 用户创建了架构:

Check here: https://support.dbagenesis.com/knowledge-base/script-to-create-hr-schema/

在这里查看:https: //support.dbagenesis.com/knowledge-base/script-to-create-hr-schema/

回答by René Nyffenegger

See this link: http://download.oracle.com/docs/cd/B19306_01/server.102/b14198/installation.htm#sthref33

请参阅此链接:http: //download.oracle.com/docs/cd/B19306_01/server.102/b14198/installation.htm#sthref33

It's under $ORACLE_HOME/demo/schema/human_resources

它在下 $ORACLE_HOME/demo/schema/human_resources