SlideShare a Scribd company logo
Oracle for
Beginners
BY: Jigar M.
What is Oracle
– Oracle database is a relational database management system. It is known as
Oracle database, Oracle DB or simply Oracle. It is produced and marketed by
Oracle Corporation.
– Oracle database is the first database designed for enterprise grid computing.
The enterprise grid computing provides the most flexible and cost effective way
to manage information and applications.
Different editions of Oracle
database
Following are the four editions of the Oracle database.
– Enterprise Edition: It is the most robust and secure edition. It offers all features,
including superior performance and security.
– Standard Edition: It provides the base functionality for users that do not require
Enterprise Edition's robust package.
– Express Edition (XE): It is the lightweight, free and limited Windows and Linux
edition.
– Oracle Lite: It is designed for mobile devices
Introduction to Oracle Datatypes
– Oracle provides the following categories of built-in datatypes:
– Overview of Character Datatypes
– Overview of Numeric Datatypes
– Overview of DATE Datatype
– Overview of LOB Datatypes
Overview of Character
Datatypes
– The character datatypes store character (alphanumeric) data in strings, with
byte values corresponding to the character encoding scheme, generally called a
character set or code page.
– The database's character set is established when you create the database.
Examples of character sets are 7-bit ASCII (American Standard Code for
Information Interchange), EBCDIC (Extended Binary Coded Decimal Interchange
Code), Code Page 500, Japan Extended UNIX, and Unicode UTF-8. Oracle
supports both single-byte and multibyte encoding schemes.
CHAR Datatype
– The CHAR datatype stores fixed-length character strings. When you create a
table with a CHAR column, you must specify a string length (in bytes or
characters) between 1 and 2000 bytes for the CHAR column width. The default
is 1 byte. Oracle then guarantees that:
 When you insert or update a row in the table, the value for the CHAR column has the
fixed length.
 If you give a shorter value, then the value is blank-padded to the fixed length.
 If a value is too large, Oracle Database returns an error.
VARCHAR2 and VARCHAR
Datatypes
– The VARCHAR2 datatype stores variable-length character strings. When you create a
table with a VARCHAR2 column, you specify a maximum string length (in bytes or
characters) between 1 and 4000 bytes for the VARCHAR2 column. For each row,
Oracle Database stores each value in the column as a variable-length field unless a
value exceeds the column's maximum length, in which case Oracle Database returns
an error. Using VARCHAR2 and VARCHAR saves on space used by the table.
– For example, assume you declare a column VARCHAR2 with a maximum size of 50
characters. In a single-byte character set, if only 10 characters are given for the
VARCHAR2 column value in a particular row, the column in the row's row piece
stores only the 10 characters (10 bytes), not 50.
VARCHAR Datatype
– The VARCHAR datatype is synonymous with the VARCHAR2 datatype. To avoid
possible changes in behavior, always use the VARCHAR2 datatype to store
variable-length character strings.
NCHAR and NVARCHAR2
Datatypes
– NCHAR and NVARCHAR2 are Unicode datatypes that store Unicode character
data. The character set of NCHAR and NVARCHAR2 datatypes can only be either
AL16UTF16 or UTF8 and is specified at database creation time as the national
character set. AL16UTF16 and UTF8 are both Unicode encoding.
 The NCHAR datatype stores fixed-length character strings that correspond to the
national character set.
 The NVARCHAR2 datatype stores variable length character strings.
Contd.
NCHAR
– The maximum length of an NCHAR column is 2000 bytes. It can hold up to 2000
characters. The actual data is subject to the maximum byte limit of 2000. The
two size constraints must be satisfied simultaneously at run time.
NVARCHAR2
– The maximum length of an NVARCHAR2 column is 4000 bytes. It can hold up to
4000 characters. The actual data is subject to the maximum byte limit of 4000.
The two size constraints must be satisfied simultaneously at run time.
LOB Character Datatypes
– The LOB datatypes for character data are CLOB and NCLOB. They can store up to
8 terabytes of character data (CLOB) or national character set data (NCLOB).
Note:
– Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead.
LONG columns are supported only for backward compatibility.
– Oracle also recommends that you convert existing LONG columns to LOB columns.
LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB
functionality is enhanced in every release, whereas LONG functionality has been
static for several releases
LONG Datatype
– Columns defined as LONG can store variable-length character data containing
up to 2 gigabytes of information. LONG data is text data that is to be
appropriately converted when moving among different systems.
– LONG datatype columns are used in the data dictionary to store the text of view
definitions. You can use LONG columns in SELECT lists, SET clauses of UPDATE
statements, and VALUES clauses of INSERT statements.
Overview of Numeric Datatypes
– The numeric datatypes store positive and negative fixed and floating-point
numbers, zero, infinity, and values that are the undefined result of an operation
(that is, is "not a number" or NAN).
– This section includes the following topics:
– NUMBER Datatype
– Floating-Point Numbers
NUMBER Datatype
– The NUMBER datatype stores fixed and floating-point numbers. Numbers of
virtually any magnitude can be stored and are guaranteed portable among
different systems operating Oracle Database, up to 38 digits of precision.
– For numeric columns, you can specify the column as:
– column_name NUMBER
– Optionally, you can also specify a precision (total number of digits) and scale
(number of digits to the right of the decimal point):
– column_name NUMBER (precision, scale)
Floating-Point Numbers
– Oracle Database provides two numeric datatypes exclusively for floating-point
numbers: BINARY_FLOAT and BINARY_DOUBLE.
– This section includes the following topics:
– BINARY_FLOAT Datatype
– BINARY_DOUBLE Datatype
Contd
BINARY_FLOAT Datatype
– BINARY_FLOAT is a 32-bit, single-precision floating-point number datatype. Each
BINARY_FLOAT value requires 5 bytes, including a length byte.
BINARY_DOUBLE Datatype
– BINARY_DOUBLE is a 64-bit, double-precision floating-point number datatype.
Each BINARY_DOUBLE value requires 9 bytes, including a length byte.
Overview of DATE Datatype
– The DATE datatype stores point-in-time values (dates and times) in a table. The
DATE datatype stores the year (including the century), the month, the day, the
hours, the minutes, and the seconds (after midnight).
– For input and output of dates, the standard Oracle date format is DD-MON-YY,
as follows:'13-NOV-92'
– You can change this default date format for an instance with the parameter
NLS_DATE_FORMAT.
– TO_DATE ('November 13, 1992', 'MONTH DD, YYYY')
Time Zones
Datatype Time Zone Fractional Seconds
DATE No No
TIMESTAMP No Yes
TIMESTAMP WITH TIME
ZONE
Explicit Yes
TIMESTAMP WITH LOCAL
TIME ZONE
Relative Yes
Overview of LOB Datatypes
– The LOB datatypes BLOB, CLOB, NCLOB, and BFILE enable you to store and manipulate large blocks
of unstructured data (such as text, graphic images, video clips, and sound waveforms) in binary or
character format.
– LOB datatypes differ from LONG and LONG RAW datatypes in several ways. For example:
 A table can contain multiple LOB columns but only one LONG column.
 A table containing one or more LOB columns can be partitioned, but a table containing a LONG column cannot
be partitioned.
 The maximum size of a LOB is 128 terabytes depending on database block size, and the maximum size of a
LONG is only 2 gigabytes.
 LOBs support random access to data, but LONGs support only sequential access.
 LOB datatypes (except NCLOB) can be attributes of a user-defined object type but LONG datatypes cannot.
 Tables with LOB columns can be replicated, but tables with LONG columns cannot.
Contd
– SQL statements define LOB columns in a table and LOB attributes in a user-defined
object type. When defining LOBs in a table, you can explicitly specify the tablespace
and storage characteristics for each LOB.
– LOB datatypes can be stored inline (within a table), out-of-line (within a tablespace,
using a LOB locator), or in an external file (BFILE datatypes). With compatibility set
to Oracle9i or higher, you can use LOBs with SQL VARCHAR operators and functions.
– This section includes the following topics:
 BLOB Datatype
 CLOB and NCLOB Datatypes
 BFILE Datatype
BLOB Datatype
– The BLOB datatype stores unstructured binary data in the database. BLOBs can
store up to 128 terabytes of binary data.
– BLOBs participate fully in transactions. Changes made to a BLOB value by the
DBMS_LOB package, PL/SQL, or the OCI can be committed or rolled back.
However, BLOB locators cannot span transactions or sessions.
CLOB and NCLOB Datatypes
– The CLOB and NCLOB datatypes store up to 128 terabytes of character data in the
database. CLOBs store database character set data, and NCLOBs store Unicode
national character set data. Storing varying-width LOB data in a fixed-width Unicode
character set internally enables Oracle Database to provide efficient character-
based random access on CLOBs and NCLOBs.
– CLOBs and NCLOBs participate fully in transactions. Changes made to a CLOB or
NCLOB value by the DBMS_LOB package, PL/SQL, or the OCI can be committed or
rolled back. However, CLOB and NCLOB locators cannot span transactions or
sessions. You cannot create an object type with NCLOB attributes, but you can
specify NCLOB parameters in a method for an object type.
BFILE Datatype
– The BFILE datatype stores unstructured binary data in operating-system files
outside the database. A BFILE column or attribute stores a file locator that
points to an external file containing the data. The amount of BFILE data that can
be stored is limited by the operating system.
– BFILEs are read only; you cannot modify them. They support only random (not
sequential) reads, and they do not participate in transactions. The underlying
operating system must maintain the file integrity, security, and durability for
BFILEs. The database administrator must ensure that the file exists and that
Oracle Database processes have operating-system read permissions on the file.
Oracle CREATE TABLE
CREATE TABLE table_name
(
column1 datatype [ NULL | NOT NULL ],
column2 datatype [ NULL | NOT NULL ],
...
column_n datatype [ NULL | NOT NULL ]
);
– table_name: It specifies the name of
the table which you want to create.
– column1, column2, ... column n: It
specifies the columns which you want
to add in the table. Every column must
have a datatype. Every column should
either be defined as "NULL" or "NOT
NULL". In the case, the value is left
blank; it is treated as "NULL" as default.
What is Primary key
– A primary key is a single field or combination of fields that contains a unique
record. It must be filled. None of the field of primary key can contain a null
value. A table can have only one primary key.
– Oracle CREATE TABLE Example with primary key
CREATE TABLE customers
( customer_id number(10) NOT NULL,
customer_name varchar2(50) NOT NULL,
city varchar2(50),
CONSTRAINT customers_pk PRIMARY KEY (customer_id)
);
Oracle ALTER TABLE
Statement
– In Oracle, ALTER TABLE statement specifies how to add, modify, drop or delete
columns in a table. It is also used to rename a table
– How to add column in a table
ALTER TABLE table_name ADD column_name column-definition;
Example:
ALTER TABLE customers ADD customer_age varchar2(50);
– How to modify multiple columns of a table
ALTER TABLE table_name MODIFY (column_1 column_type,
column_2 column_type, ...
column_n column_type);
How to drop column of a table
Syntax
– ALTER TABLE table_name DROP COLUMN column_name;
Example
– ALTER TABLE customers DROP COLUMN customer_name;
How to rename column of a table
Syntax
– ALTER TABLE table_name RENAME COLUMN old_name to new_name;
Example
– ALTER TABLE customers RENAME COLUMN customer_name to cname;
How to rename table
Syntax
– ALTER TABLE table_name RENAME TO new_table_name;
Example
– ALTER TABLE customers RENAME TO retailers;
Continued to Part-2
Thank You

More Related Content

What's hot

Introduction of Oracle
Introduction of Oracle Introduction of Oracle
Introduction of Oracle
Salman Memon
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
rehaniltifat
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
Tanmoy Barman
 
Create table
Create tableCreate table
Create table
Nitesh Singh
 
SQL Views
SQL ViewsSQL Views
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
Akash Pramanik
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
Hammad Rasheed
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
Ehsan Hamzei
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
Jin Castor
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
baabtra.com - No. 1 supplier of quality freshers
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
Shakila Mahjabin
 
Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)
Bilal Arshad
 
SQL Views
SQL ViewsSQL Views
SQL Views
Aaron Buma
 
Sql ppt
Sql pptSql ppt
Sql ppt
Anuja Lad
 
SQL commands
SQL commandsSQL commands
SQL commands
GirdharRatne
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
Sharad Dubey
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
koolkampus
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.
yhen06
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
webhostingguy
 
An Introduction To Oracle Database
An Introduction To Oracle DatabaseAn Introduction To Oracle Database
An Introduction To Oracle Database
Meysam Javadi
 

What's hot (20)

Introduction of Oracle
Introduction of Oracle Introduction of Oracle
Introduction of Oracle
 
1 - Introduction to PL/SQL
1 - Introduction to PL/SQL1 - Introduction to PL/SQL
1 - Introduction to PL/SQL
 
JDBC: java DataBase connectivity
JDBC: java DataBase connectivityJDBC: java DataBase connectivity
JDBC: java DataBase connectivity
 
Create table
Create tableCreate table
Create table
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
The oracle database architecture
The oracle database architectureThe oracle database architecture
The oracle database architecture
 
SQL Basics
SQL BasicsSQL Basics
SQL Basics
 
Introduction to SQL
Introduction to SQLIntroduction to SQL
Introduction to SQL
 
Introduction to xampp
Introduction to xamppIntroduction to xampp
Introduction to xampp
 
Chapter 1 introduction to sql server
Chapter 1 introduction to sql serverChapter 1 introduction to sql server
Chapter 1 introduction to sql server
 
Entity Relationship Diagram
Entity Relationship DiagramEntity Relationship Diagram
Entity Relationship Diagram
 
Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)Introduction to oracle database (basic concepts)
Introduction to oracle database (basic concepts)
 
SQL Views
SQL ViewsSQL Views
SQL Views
 
Sql ppt
Sql pptSql ppt
Sql ppt
 
SQL commands
SQL commandsSQL commands
SQL commands
 
SQL(DDL & DML)
SQL(DDL & DML)SQL(DDL & DML)
SQL(DDL & DML)
 
1. Introduction to DBMS
1. Introduction to DBMS1. Introduction to DBMS
1. Introduction to DBMS
 
Database system environment ppt.
Database system environment ppt.Database system environment ppt.
Database system environment ppt.
 
MYSQL.ppt
MYSQL.pptMYSQL.ppt
MYSQL.ppt
 
An Introduction To Oracle Database
An Introduction To Oracle DatabaseAn Introduction To Oracle Database
An Introduction To Oracle Database
 

Similar to Oracle

SQL, Oracle, Joins
SQL, Oracle, JoinsSQL, Oracle, Joins
SQL, Oracle, Joins
Gaurish Goel
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
rainynovember12
 
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
Harmanjot5678
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
Ravinder Kamboj
 
SQL-1.pptx for database system and system query language
SQL-1.pptx for database system  and system query languageSQL-1.pptx for database system  and system query language
SQL-1.pptx for database system and system query language
ironman82715
 
Plsql quick guide
Plsql quick guidePlsql quick guide
Plsql quick guide
1bi08me024
 
Vertica
VerticaVertica
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
KalsoomTahir2
 
Sql Server Interview Question
Sql Server Interview QuestionSql Server Interview Question
Sql Server Interview Question
pukal rani
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
Dr. C.V. Suresh Babu
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
Dr. C.V. Suresh Babu
 
MySql
MySqlMySql
2016 02 23_biological_databases_part2
2016 02 23_biological_databases_part22016 02 23_biological_databases_part2
2016 02 23_biological_databases_part2
Prof. Wim Van Criekinge
 
ADBMS Unit-II b
ADBMS Unit-II bADBMS Unit-II b
Unit 4 plsql
Unit 4  plsqlUnit 4  plsql
Unit 4 plsql
DrkhanchanaR
 
2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload
Prof. Wim Van Criekinge
 
2017 biological databasespart2
2017 biological databasespart22017 biological databasespart2
2017 biological databasespart2
Prof. Wim Van Criekinge
 
Oracle Introduction
Oracle Introduction Oracle Introduction
Oracle Introduction
Mohana Rajendiran
 
Dbmsunit v
Dbmsunit vDbmsunit v
Dbmsunit v
Mohana Rajendiran
 
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
Harmanjot5678
 

Similar to Oracle (20)

SQL, Oracle, Joins
SQL, Oracle, JoinsSQL, Oracle, Joins
SQL, Oracle, Joins
 
Sql Basics And Advanced
Sql Basics And AdvancedSql Basics And Advanced
Sql Basics And Advanced
 
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
 
Sql fundamentals
Sql fundamentalsSql fundamentals
Sql fundamentals
 
SQL-1.pptx for database system and system query language
SQL-1.pptx for database system  and system query languageSQL-1.pptx for database system  and system query language
SQL-1.pptx for database system and system query language
 
Plsql quick guide
Plsql quick guidePlsql quick guide
Plsql quick guide
 
Vertica
VerticaVertica
Vertica
 
1650607.ppt
1650607.ppt1650607.ppt
1650607.ppt
 
Sql Server Interview Question
Sql Server Interview QuestionSql Server Interview Question
Sql Server Interview Question
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
Sql intro & ddl 1
Sql intro & ddl 1Sql intro & ddl 1
Sql intro & ddl 1
 
MySql
MySqlMySql
MySql
 
2016 02 23_biological_databases_part2
2016 02 23_biological_databases_part22016 02 23_biological_databases_part2
2016 02 23_biological_databases_part2
 
ADBMS Unit-II b
ADBMS Unit-II bADBMS Unit-II b
ADBMS Unit-II b
 
Unit 4 plsql
Unit 4  plsqlUnit 4  plsql
Unit 4 plsql
 
2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload2018 02 20_biological_databases_part2_v_upload
2018 02 20_biological_databases_part2_v_upload
 
2017 biological databasespart2
2017 biological databasespart22017 biological databasespart2
2017 biological databasespart2
 
Oracle Introduction
Oracle Introduction Oracle Introduction
Oracle Introduction
 
Dbmsunit v
Dbmsunit vDbmsunit v
Dbmsunit v
 
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
429cf300-0dc7-4c2e-9280-d918d69e3cb4.pptx
 

More from JIGAR MAKHIJA

Php gd library
Php gd libraryPhp gd library
Php gd library
JIGAR MAKHIJA
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matching
JIGAR MAKHIJA
 
Php cookies
Php cookiesPhp cookies
Php cookies
JIGAR MAKHIJA
 
Php functions
Php functionsPhp functions
Php functions
JIGAR MAKHIJA
 
Php sessions
Php sessionsPhp sessions
Php sessions
JIGAR MAKHIJA
 
Php server variables
Php server variablesPhp server variables
Php server variables
JIGAR MAKHIJA
 
Db function
Db functionDb function
Db function
JIGAR MAKHIJA
 
C++ version 1
C++  version 1C++  version 1
C++ version 1
JIGAR MAKHIJA
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
JIGAR MAKHIJA
 
SAP Ui5 content
SAP Ui5 contentSAP Ui5 content
SAP Ui5 content
JIGAR MAKHIJA
 
Solution doc
Solution docSolution doc
Solution doc
JIGAR MAKHIJA
 
Overview on Application protocols in Internet of Things
Overview on Application protocols in Internet of ThingsOverview on Application protocols in Internet of Things
Overview on Application protocols in Internet of Things
JIGAR MAKHIJA
 
125 green iot
125 green iot125 green iot
125 green iot
JIGAR MAKHIJA
 
Msp430 g2 with ble(Bluetooth Low Energy)
Msp430 g2 with ble(Bluetooth Low Energy)Msp430 g2 with ble(Bluetooth Low Energy)
Msp430 g2 with ble(Bluetooth Low Energy)
JIGAR MAKHIJA
 
Embedded system lab work
Embedded system lab workEmbedded system lab work
Embedded system lab work
JIGAR MAKHIJA
 
Presentation on iot- Internet of Things
Presentation on iot- Internet of ThingsPresentation on iot- Internet of Things
Presentation on iot- Internet of Things
JIGAR MAKHIJA
 
Learn Japanese -Basic kanji 120
Learn Japanese -Basic kanji 120Learn Japanese -Basic kanji 120
Learn Japanese -Basic kanji 120
JIGAR MAKHIJA
 
View Alignment Techniques
View Alignment TechniquesView Alignment Techniques
View Alignment Techniques
JIGAR MAKHIJA
 
Letters (complaints & invitations)
Letters (complaints & invitations)Letters (complaints & invitations)
Letters (complaints & invitations)
JIGAR MAKHIJA
 
Letter Writing invitation-letter
Letter Writing invitation-letterLetter Writing invitation-letter
Letter Writing invitation-letter
JIGAR MAKHIJA
 

More from JIGAR MAKHIJA (20)

Php gd library
Php gd libraryPhp gd library
Php gd library
 
Php pattern matching
Php pattern matchingPhp pattern matching
Php pattern matching
 
Php cookies
Php cookiesPhp cookies
Php cookies
 
Php functions
Php functionsPhp functions
Php functions
 
Php sessions
Php sessionsPhp sessions
Php sessions
 
Php server variables
Php server variablesPhp server variables
Php server variables
 
Db function
Db functionDb function
Db function
 
C++ version 1
C++  version 1C++  version 1
C++ version 1
 
C++ Version 2
C++  Version 2C++  Version 2
C++ Version 2
 
SAP Ui5 content
SAP Ui5 contentSAP Ui5 content
SAP Ui5 content
 
Solution doc
Solution docSolution doc
Solution doc
 
Overview on Application protocols in Internet of Things
Overview on Application protocols in Internet of ThingsOverview on Application protocols in Internet of Things
Overview on Application protocols in Internet of Things
 
125 green iot
125 green iot125 green iot
125 green iot
 
Msp430 g2 with ble(Bluetooth Low Energy)
Msp430 g2 with ble(Bluetooth Low Energy)Msp430 g2 with ble(Bluetooth Low Energy)
Msp430 g2 with ble(Bluetooth Low Energy)
 
Embedded system lab work
Embedded system lab workEmbedded system lab work
Embedded system lab work
 
Presentation on iot- Internet of Things
Presentation on iot- Internet of ThingsPresentation on iot- Internet of Things
Presentation on iot- Internet of Things
 
Learn Japanese -Basic kanji 120
Learn Japanese -Basic kanji 120Learn Japanese -Basic kanji 120
Learn Japanese -Basic kanji 120
 
View Alignment Techniques
View Alignment TechniquesView Alignment Techniques
View Alignment Techniques
 
Letters (complaints & invitations)
Letters (complaints & invitations)Letters (complaints & invitations)
Letters (complaints & invitations)
 
Letter Writing invitation-letter
Letter Writing invitation-letterLetter Writing invitation-letter
Letter Writing invitation-letter
 

Recently uploaded

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
GeorgeMilliken2
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Henry Hollis
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Fajar Baskoro
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
RamseyBerglund
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
National Information Standards Organization (NISO)
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
Nguyen Thanh Tu Collection
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
deepaannamalai16
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
PECB
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
Krassimira Luka
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
TechSoup
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
khuleseema60
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
HajraNaeem15
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
EduSkills OECD
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Denish Jangid
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
TechSoup
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
siemaillard
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
deepaannamalai16
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
giancarloi8888
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
MysoreMuleSoftMeetup
 

Recently uploaded (20)

What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
What is Digital Literacy? A guest blog from Andy McLaughlin, University of Ab...
 
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.pptLevel 3 NCEA - NZ: A  Nation In the Making 1872 - 1900 SML.ppt
Level 3 NCEA - NZ: A Nation In the Making 1872 - 1900 SML.ppt
 
Pengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptxPengantar Penggunaan Flutter - Dart programming language1.pptx
Pengantar Penggunaan Flutter - Dart programming language1.pptx
 
Electric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger HuntElectric Fetus - Record Store Scavenger Hunt
Electric Fetus - Record Store Scavenger Hunt
 
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
Jemison, MacLaughlin, and Majumder "Broadening Pathways for Editors and Authors"
 
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
BÀI TẬP BỔ TRỢ TIẾNG ANH LỚP 9 CẢ NĂM - GLOBAL SUCCESS - NĂM HỌC 2024-2025 - ...
 
HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.HYPERTENSION - SLIDE SHARE PRESENTATION.
HYPERTENSION - SLIDE SHARE PRESENTATION.
 
Juneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School DistrictJuneteenth Freedom Day 2024 David Douglas School District
Juneteenth Freedom Day 2024 David Douglas School District
 
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
ISO/IEC 27001, ISO/IEC 42001, and GDPR: Best Practices for Implementation and...
 
Temple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation resultsTemple of Asclepius in Thrace. Excavation results
Temple of Asclepius in Thrace. Excavation results
 
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
Elevate Your Nonprofit's Online Presence_ A Guide to Effective SEO Strategies...
 
MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025MDP on air pollution of class 8 year 2024-2025
MDP on air pollution of class 8 year 2024-2025
 
How to deliver Powerpoint Presentations.pptx
How to deliver Powerpoint  Presentations.pptxHow to deliver Powerpoint  Presentations.pptx
How to deliver Powerpoint Presentations.pptx
 
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptxBeyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
Beyond Degrees - Empowering the Workforce in the Context of Skills-First.pptx
 
Chapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptxChapter wise All Notes of First year Basic Civil Engineering.pptx
Chapter wise All Notes of First year Basic Civil Engineering.pptx
 
Leveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit InnovationLeveraging Generative AI to Drive Nonprofit Innovation
Leveraging Generative AI to Drive Nonprofit Innovation
 
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptxPrésentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
Présentationvvvvvvvvvvvvvvvvvvvvvvvvvvvv2.pptx
 
Standardized tool for Intelligence test.
Standardized tool for Intelligence test.Standardized tool for Intelligence test.
Standardized tool for Intelligence test.
 
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdfREASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
REASIGNACION 2024 UGEL CHUPACA 2024 UGEL CHUPACA.pdf
 
Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47Mule event processing models | MuleSoft Mysore Meetup #47
Mule event processing models | MuleSoft Mysore Meetup #47
 

Oracle

  • 2. What is Oracle – Oracle database is a relational database management system. It is known as Oracle database, Oracle DB or simply Oracle. It is produced and marketed by Oracle Corporation. – Oracle database is the first database designed for enterprise grid computing. The enterprise grid computing provides the most flexible and cost effective way to manage information and applications.
  • 3. Different editions of Oracle database Following are the four editions of the Oracle database. – Enterprise Edition: It is the most robust and secure edition. It offers all features, including superior performance and security. – Standard Edition: It provides the base functionality for users that do not require Enterprise Edition's robust package. – Express Edition (XE): It is the lightweight, free and limited Windows and Linux edition. – Oracle Lite: It is designed for mobile devices
  • 4. Introduction to Oracle Datatypes – Oracle provides the following categories of built-in datatypes: – Overview of Character Datatypes – Overview of Numeric Datatypes – Overview of DATE Datatype – Overview of LOB Datatypes
  • 5. Overview of Character Datatypes – The character datatypes store character (alphanumeric) data in strings, with byte values corresponding to the character encoding scheme, generally called a character set or code page. – The database's character set is established when you create the database. Examples of character sets are 7-bit ASCII (American Standard Code for Information Interchange), EBCDIC (Extended Binary Coded Decimal Interchange Code), Code Page 500, Japan Extended UNIX, and Unicode UTF-8. Oracle supports both single-byte and multibyte encoding schemes.
  • 6. CHAR Datatype – The CHAR datatype stores fixed-length character strings. When you create a table with a CHAR column, you must specify a string length (in bytes or characters) between 1 and 2000 bytes for the CHAR column width. The default is 1 byte. Oracle then guarantees that:  When you insert or update a row in the table, the value for the CHAR column has the fixed length.  If you give a shorter value, then the value is blank-padded to the fixed length.  If a value is too large, Oracle Database returns an error.
  • 7. VARCHAR2 and VARCHAR Datatypes – The VARCHAR2 datatype stores variable-length character strings. When you create a table with a VARCHAR2 column, you specify a maximum string length (in bytes or characters) between 1 and 4000 bytes for the VARCHAR2 column. For each row, Oracle Database stores each value in the column as a variable-length field unless a value exceeds the column's maximum length, in which case Oracle Database returns an error. Using VARCHAR2 and VARCHAR saves on space used by the table. – For example, assume you declare a column VARCHAR2 with a maximum size of 50 characters. In a single-byte character set, if only 10 characters are given for the VARCHAR2 column value in a particular row, the column in the row's row piece stores only the 10 characters (10 bytes), not 50.
  • 8. VARCHAR Datatype – The VARCHAR datatype is synonymous with the VARCHAR2 datatype. To avoid possible changes in behavior, always use the VARCHAR2 datatype to store variable-length character strings.
  • 9. NCHAR and NVARCHAR2 Datatypes – NCHAR and NVARCHAR2 are Unicode datatypes that store Unicode character data. The character set of NCHAR and NVARCHAR2 datatypes can only be either AL16UTF16 or UTF8 and is specified at database creation time as the national character set. AL16UTF16 and UTF8 are both Unicode encoding.  The NCHAR datatype stores fixed-length character strings that correspond to the national character set.  The NVARCHAR2 datatype stores variable length character strings.
  • 10. Contd. NCHAR – The maximum length of an NCHAR column is 2000 bytes. It can hold up to 2000 characters. The actual data is subject to the maximum byte limit of 2000. The two size constraints must be satisfied simultaneously at run time. NVARCHAR2 – The maximum length of an NVARCHAR2 column is 4000 bytes. It can hold up to 4000 characters. The actual data is subject to the maximum byte limit of 4000. The two size constraints must be satisfied simultaneously at run time.
  • 11. LOB Character Datatypes – The LOB datatypes for character data are CLOB and NCLOB. They can store up to 8 terabytes of character data (CLOB) or national character set data (NCLOB). Note: – Do not create tables with LONG columns. Use LOB columns (CLOB, NCLOB) instead. LONG columns are supported only for backward compatibility. – Oracle also recommends that you convert existing LONG columns to LOB columns. LOB columns are subject to far fewer restrictions than LONG columns. Further, LOB functionality is enhanced in every release, whereas LONG functionality has been static for several releases
  • 12. LONG Datatype – Columns defined as LONG can store variable-length character data containing up to 2 gigabytes of information. LONG data is text data that is to be appropriately converted when moving among different systems. – LONG datatype columns are used in the data dictionary to store the text of view definitions. You can use LONG columns in SELECT lists, SET clauses of UPDATE statements, and VALUES clauses of INSERT statements.
  • 13. Overview of Numeric Datatypes – The numeric datatypes store positive and negative fixed and floating-point numbers, zero, infinity, and values that are the undefined result of an operation (that is, is "not a number" or NAN). – This section includes the following topics: – NUMBER Datatype – Floating-Point Numbers
  • 14. NUMBER Datatype – The NUMBER datatype stores fixed and floating-point numbers. Numbers of virtually any magnitude can be stored and are guaranteed portable among different systems operating Oracle Database, up to 38 digits of precision. – For numeric columns, you can specify the column as: – column_name NUMBER – Optionally, you can also specify a precision (total number of digits) and scale (number of digits to the right of the decimal point): – column_name NUMBER (precision, scale)
  • 15. Floating-Point Numbers – Oracle Database provides two numeric datatypes exclusively for floating-point numbers: BINARY_FLOAT and BINARY_DOUBLE. – This section includes the following topics: – BINARY_FLOAT Datatype – BINARY_DOUBLE Datatype
  • 16. Contd BINARY_FLOAT Datatype – BINARY_FLOAT is a 32-bit, single-precision floating-point number datatype. Each BINARY_FLOAT value requires 5 bytes, including a length byte. BINARY_DOUBLE Datatype – BINARY_DOUBLE is a 64-bit, double-precision floating-point number datatype. Each BINARY_DOUBLE value requires 9 bytes, including a length byte.
  • 17. Overview of DATE Datatype – The DATE datatype stores point-in-time values (dates and times) in a table. The DATE datatype stores the year (including the century), the month, the day, the hours, the minutes, and the seconds (after midnight). – For input and output of dates, the standard Oracle date format is DD-MON-YY, as follows:'13-NOV-92' – You can change this default date format for an instance with the parameter NLS_DATE_FORMAT. – TO_DATE ('November 13, 1992', 'MONTH DD, YYYY')
  • 18. Time Zones Datatype Time Zone Fractional Seconds DATE No No TIMESTAMP No Yes TIMESTAMP WITH TIME ZONE Explicit Yes TIMESTAMP WITH LOCAL TIME ZONE Relative Yes
  • 19. Overview of LOB Datatypes – The LOB datatypes BLOB, CLOB, NCLOB, and BFILE enable you to store and manipulate large blocks of unstructured data (such as text, graphic images, video clips, and sound waveforms) in binary or character format. – LOB datatypes differ from LONG and LONG RAW datatypes in several ways. For example:  A table can contain multiple LOB columns but only one LONG column.  A table containing one or more LOB columns can be partitioned, but a table containing a LONG column cannot be partitioned.  The maximum size of a LOB is 128 terabytes depending on database block size, and the maximum size of a LONG is only 2 gigabytes.  LOBs support random access to data, but LONGs support only sequential access.  LOB datatypes (except NCLOB) can be attributes of a user-defined object type but LONG datatypes cannot.  Tables with LOB columns can be replicated, but tables with LONG columns cannot.
  • 20. Contd – SQL statements define LOB columns in a table and LOB attributes in a user-defined object type. When defining LOBs in a table, you can explicitly specify the tablespace and storage characteristics for each LOB. – LOB datatypes can be stored inline (within a table), out-of-line (within a tablespace, using a LOB locator), or in an external file (BFILE datatypes). With compatibility set to Oracle9i or higher, you can use LOBs with SQL VARCHAR operators and functions. – This section includes the following topics:  BLOB Datatype  CLOB and NCLOB Datatypes  BFILE Datatype
  • 21. BLOB Datatype – The BLOB datatype stores unstructured binary data in the database. BLOBs can store up to 128 terabytes of binary data. – BLOBs participate fully in transactions. Changes made to a BLOB value by the DBMS_LOB package, PL/SQL, or the OCI can be committed or rolled back. However, BLOB locators cannot span transactions or sessions.
  • 22. CLOB and NCLOB Datatypes – The CLOB and NCLOB datatypes store up to 128 terabytes of character data in the database. CLOBs store database character set data, and NCLOBs store Unicode national character set data. Storing varying-width LOB data in a fixed-width Unicode character set internally enables Oracle Database to provide efficient character- based random access on CLOBs and NCLOBs. – CLOBs and NCLOBs participate fully in transactions. Changes made to a CLOB or NCLOB value by the DBMS_LOB package, PL/SQL, or the OCI can be committed or rolled back. However, CLOB and NCLOB locators cannot span transactions or sessions. You cannot create an object type with NCLOB attributes, but you can specify NCLOB parameters in a method for an object type.
  • 23. BFILE Datatype – The BFILE datatype stores unstructured binary data in operating-system files outside the database. A BFILE column or attribute stores a file locator that points to an external file containing the data. The amount of BFILE data that can be stored is limited by the operating system. – BFILEs are read only; you cannot modify them. They support only random (not sequential) reads, and they do not participate in transactions. The underlying operating system must maintain the file integrity, security, and durability for BFILEs. The database administrator must ensure that the file exists and that Oracle Database processes have operating-system read permissions on the file.
  • 24. Oracle CREATE TABLE CREATE TABLE table_name ( column1 datatype [ NULL | NOT NULL ], column2 datatype [ NULL | NOT NULL ], ... column_n datatype [ NULL | NOT NULL ] ); – table_name: It specifies the name of the table which you want to create. – column1, column2, ... column n: It specifies the columns which you want to add in the table. Every column must have a datatype. Every column should either be defined as "NULL" or "NOT NULL". In the case, the value is left blank; it is treated as "NULL" as default.
  • 25. What is Primary key – A primary key is a single field or combination of fields that contains a unique record. It must be filled. None of the field of primary key can contain a null value. A table can have only one primary key. – Oracle CREATE TABLE Example with primary key CREATE TABLE customers ( customer_id number(10) NOT NULL, customer_name varchar2(50) NOT NULL, city varchar2(50), CONSTRAINT customers_pk PRIMARY KEY (customer_id) );
  • 26. Oracle ALTER TABLE Statement – In Oracle, ALTER TABLE statement specifies how to add, modify, drop or delete columns in a table. It is also used to rename a table – How to add column in a table ALTER TABLE table_name ADD column_name column-definition; Example: ALTER TABLE customers ADD customer_age varchar2(50); – How to modify multiple columns of a table ALTER TABLE table_name MODIFY (column_1 column_type, column_2 column_type, ... column_n column_type);
  • 27. How to drop column of a table Syntax – ALTER TABLE table_name DROP COLUMN column_name; Example – ALTER TABLE customers DROP COLUMN customer_name;
  • 28. How to rename column of a table Syntax – ALTER TABLE table_name RENAME COLUMN old_name to new_name; Example – ALTER TABLE customers RENAME COLUMN customer_name to cname;
  • 29. How to rename table Syntax – ALTER TABLE table_name RENAME TO new_table_name; Example – ALTER TABLE customers RENAME TO retailers;