Oracle 9i database entry (installation and basic statements)

Source: Internet
Author: User

I started learning Oracle9i today, so I won't talk about installation. Here is the portal. I have a problem with the second dish, and I am out of touch with the traditional installation method. I ignore it, we directly found a RAR download of CD2 and installed it successfully. If the database is not installed, we will be prompted to complete the download.

Then I select the Enterprise Manager Console, as shown in:

The following dialog box is displayed. because you do not know the password, select start independently.

Select Configuration, and click Edit local ID

 

Modify the account and password

Then download and install the PL/SQL Chinese version, and then log on to Oracle normally.

The shortcut key for PL/SQL Execution is not F5 or F8. Please note that ....

 

The process of table creation and query is as follows:

1. Create a table

 

Because I was a beginner, I directly wrote a name with the following fields:

Since Oracle does not have auto-increment, a sequence is created.

The SQL statement is as follows: Create sequence ABC increment by 1 start with 2000
Maxvalue 99999 cycle nocache;

Or directly in the sequences on the right, and then create a new one ....

My SQL statement creates a sequence that starts from 2000 and ends with 99999. Each sequence increments by 1.

After the creation, insert the test table and insert it as follows: insert into test values (2500, 'John ', ABC. nextval );

ABC is the sequence named ABC. nextval refers to the next serial number and currval refers to the current serial number.

Select ABC. currval from dual; to know the current serial number.

Finally,

We are here today ....

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.