Professional Documents
Culture Documents
Oracle 19C
Oracle 19C
Oracle 19C
If any user wants to perform some operations on oracle database, then that
user uses following 2 step process.
Step 1:- CONNECT Ex:- SQL plus tool
Step 2:- Communication Ex:- SQL, PL/SQL languages
If any user wants to perform some operations in oracle database, then those
users first connect to oracle database by using client tool.
Whenever we are installing oracle software then automatically SQL plus tool is
created. That is why SQL plus is a default tool.
Ex:- SQL Plus tool
SQL Plus is an interactive query tool installed automatically when you install
oracle software. SQL Plus has a command line interface that allows users to
connect to oracle database server and executes statements interactively.
To clear screen:
Sql>cl scr;
Eg:
Sql>select * from emp;
In sqlplus tool by default each line having maximum 80 bytes. In our table any
line having more than 80 bytes then that table does not display properly. To
overcome this problem then we mush linesize sqlplus environment variable by
using following syntax.
In Sqlplus tool by default each page having maximum 14 rows. Whenever our
table having more than 14 lines then automatically column names are
repeated in a table. To overcome this problem then we must set sqlplus tool
pagesize environment variable by using following syntax.
Sql>set pagesize anynumber;
Note: Oracle 18C introduced window option along with set linesize command.
Sql>set linesize window;
This command dynamically change and format the displayed output to fit the
screen or window size.
When we are using this command then we are not require to use pagesize
command.
If we want to view all predefined sqlplus tool environment commands and
related default values then we are using following syntax
Sql>show all;
Oracle 19C installation process
Step1: Go to Google -> Oracle software download -> database -> oracle
Enterprise Edition -> Microsoft windows 64 bit zip
Step2: Download oracle 19c
Step3: Extract files
Step4: WINDOWS.X64_193000_db_home
Step5: double click that file and then select setup.exe
Step6: select first radio button – Create and configure a single instance
database. This option creates a starter database
Step7: Select first radio button – Desktop class
Step8: Select – use windows built in account – Yes
Step9:
Oracle base
Software location
Database file location
Database Edition Enterprise Edition
Character set
Global database name: orcl
Password – own password
Don’t choose – Create container database
Note: Are you sure you want to continue – Yes
Automatically installed oracle 19c database – Finish
In Oracle whenever we are using char datatype and also when we try to
store less number of bytes than the maximum size specified in char
datatype then oracle server internally automatically adds blank spaces in
place of remaining bytes to the end of the string. This is called blank
padded mechanism.
Varchar2(size): Oracle 7.0 introduced varchar2 datatype. It is used to
store variable length alpha-numeric data in bytes.
Whenever we are using varchar2 datatype and also when we try to store
less number of bytes than the maximum size specified in varchar2
declaration then oracle server does not blank spaces in place of
remaining bytes. That’s why here disk space never wasted.
In Oracle when we try to store more number of bytes than the maximum
size specified in varchar2 datatype then oracle server returns an error
Date: It is used to store dates in oracle date format
Note2: Oracle server doesn’t return any error when we try to specify
more number of digits after decimal point than the scale size specified in
declaration. Because in this case oracle server internally automatically
round that number based on the scale size in declaration.
Number(p): It is used to store integers only. It does not store floating
point values
Modify: It is used to change column data type or column data type size.
Alter ….. drop: It is used to remove columns from existing table