Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to install the oracle database

2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

1. Download:

Http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

Accept is fine. My windows here is 64-bit, so download windows x64. Click See All:

If you don't have an oracle account, you still need to register and activate. After logging in, you can download it.

Click accept license to download the 1 and 2 zip packages of the database file.

II. Installation

1. When the download is complete, extract the two compressed files to the same folder. The file name defaults to database

two。 Go to the database directory, click setup.exe, and wait a moment to display the installation interface.

When the download is complete, extract and double-click setup.exe. As follows:

In the pop-up prompt box to choose options according to your needs, my side is mainly to say that my computer configuration can not keep up, but it does not matter, you can continue. As shown in the figure:

Here is to verify that the oracle database is installed correctly:

Open the console. Type sqlplus / as sysdba; enter, and the following output appears:

Type select * from version; version information appears:

SQL > create user username identified by password

/ / naming rules:

1 the name must start with a letter

2 the length cannot exceed 30 characters (60 bytes)

3 cannot use the reserved word grant dba to username of oracle

/ / Authorization for users: permissions / / grant permissions to caches # username:

SQL > conn username/password

III. Additions, deletions, modifications and queries of oracle

Create a table:

Create table table name (

Column1 datatype

Column2 datatype

Column3 datatype

)

/ / oracle data type

Number: integer valu

Varchar2: character type must be enclosed in single quotation marks when inserting values

Number (mfocus n): eg.number (5penny 2) / / A total of 5 digits, two of which are decimal places

Number (m): eg. Number (5) / / A total of five digits, no decimal

Char:// query is fast, but a waste of space, fixed length, 2000 characters (4000 bytes), eg. The string char (5); / / can be set to 5, but the content must be 'content', enclosed in single quotation marks.

Clob:clob (characterlarge object); / / character large object with a maximum of 4G.

Date:// time format. When values () is assigned, you can use this to change the format: to_date ('20-2-81)

Blob:// binary data movies, pictures, music, 4G will not be put in the database, file server

/ / change the table name

Rename old table name to new table name

/ / add rows (contents) to the table:

Insert into user name. Table name (attribute 1, attribute 2. Unip * optional * /) values (value, value...)

/ / add a field to the form: (add a column / attribute)

Alter table table name add ("name" number (3) / * type, which specifies the content format * /)

/ / multiple inserts:

Insert into new table name (field name)

Select column from table name where row qualifier (not all data, age, a department)

/ / for example: insert into emp (id) select age from emp where id = 33

/ / add the values of the id column in the emp table to the id column of the emp table with a value of 33, and the corresponding age values.

/ / back up the table:

Create table table name as select * from table name

/ / Delete:

/ / Delete users and tables:

/ / Delete users can only be deleted with sys users, because only sys users have the right to delete other users

Drop user user name cascade;// user deleted together with table

/ / Delete the table:

Drop table user name. Table name; / / Delete table

/ / Delete permissions:

Revoke operation name (permission) on table name from user name

/ / Delete a table field: (delete a column / attribute)

Alter table table name drop column column name; / / it is strongly recommended not to do this for mature systems

/ / Delete lines: indefinite number

Delete from table name where row qualifier

Qualification such as: delete all Kay in the column name

Delete from emp where name = 'Kay'

/ / Delete the data of the table

Truncate table table name; / / equivalent to deleting the table and data and then rebuilding the table.

For more information, please see: http://www.cnblogs.com/xrmqbl/p/4833366.html

Http://www.cnblogs.com/vivi-lxm/p/5081863.html

For children's shoes that need to be as visual as Mysql, you can see the back of this blog post: https://www.2cto.com/database/201604/497852.html

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report