The document discusses SQL commands and concepts. It begins by explaining the different types of SQL statements: Data Definition Language (DDL) for creating and modifying database objects, Data Manipulation Language (DML) for manipulating data, Data Retrieval Language (DRL) for querying data, Transaction Control Language (TCL) for managing transactions, and Data Control Language (DCL) for managing user access. It then provides examples of key DDL commands like CREATE, ALTER, and DROP TABLE and DML commands like INSERT, UPDATE, DELETE. It concludes by introducing aggregate functions in SQL like COUNT for summarizing data.
This document discusses SQL and Oracle database concepts. It provides definitions of SQL, Oracle, and key Oracle data types. It also summarizes Oracle's object-relational capabilities and explains how to perform common data definition language (DDL) tasks like creating tables, adding constraints, and altering table structures in 3 sentences or less.
This document provides an overview of Oracle database including:
- Oracle is a powerful relational database management system (RDBMS) that allows sharing of data across multiple users through a centralized database server.
- It supports both relational and object-oriented features, making it an object-relational database management system (ORDBMS).
- SQL is the standard language used to access and manage data within an Oracle or other relational database.
1) Structured Query Language (SQL) is a programming language used to store and manipulate data within relational databases.
2) SQL became a standard of ANSI in 1986 and ISO in 1987.
3) SQL was one of the first languages to use Edgar Codd's relational model, as described in his 1970 paper, despite not fully adhering to Codd's model.
This document provides an overview of SQL commands and concepts. It begins by defining SQL and its uses for manipulating and retrieving data from relational databases. It then covers the main SQL commands: DDL for schema definition, DML for data manipulation, DCL for security, and TCL for transactions. Common data types are also defined. The document proceeds to explain SQL syntax and components like keywords, identifiers, and clauses. Specific SQL commands like CREATE TABLE, ALTER TABLE, DROP TABLE, INSERT, UPDATE, DELETE, SELECT are described along with examples. Logical and comparison operators are defined. The WHERE clause for filtering rows is explained.
This document provides an overview of SQL commands and concepts. It begins by defining SQL and its purpose for manipulating data in relational database systems. It then covers the main SQL commands categorized as DDL, DML, DCL, and TCL. Examples are provided for commands like CREATE TABLE, ALTER TABLE, INSERT, UPDATE, DELETE, SELECT and more. Logical and comparison operators are also defined. The document concludes with examples of implementing SQL commands to interact with database tables.
Structured Query Language
SQL Commands:
• The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP
The document provides information about SQL and PL/SQL. It discusses SQL, which is a standard language for database manipulation. It allows users to create, update, retrieve, and delete data from databases. The document also describes SQL history, characteristics, advantages, datatypes, and commands including DDL, DML, DCL, and TCL. It then discusses MySQL, its features, datatypes, and how to install and connect to MySQL.
SQL is a standard language used to create, access, and manipulate databases. It allows users to define, manipulate, and control access to data and structures within a database. Some key SQL elements include commands to create and delete tables, retrieve and modify data, and control user access privileges. Common SQL commands are used for data definition (DDL), data manipulation (DML), and transaction control. Constraints like primary keys, foreign keys, unique keys and check constraints are used to define rules to maintain data integrity in SQL tables.
The document discusses various SQL commands and concepts. It begins by defining SQL and explaining its purpose and architecture. It then covers the different types of SQL commands - DDL, DML, DCL, and TCL. Specific commands like CREATE, SELECT, INSERT, UPDATE and DELETE are discussed along with their uses. Data types like NUMBER, CHAR, VARCHAR, DATE and LONG are also explained. The document provides examples of creating a table and altering it using SQL statements.
SQL is a language used to create, access, and manipulate data in databases. SQL statements are categorized into data definition language, data manipulation language, data control language, transaction control language, and embedded SQL statements. Data definition language statements define, alter, or drop database objects. Data manipulation language statements query or manipulate data in existing database objects. Data control language statements grant and revoke privileges to users. Transaction control language statements manage transactions of data manipulation language statements. Embedded SQL statements incorporate other SQL statements into procedural programs.
The document provides an overview of database management systems (DBMS) and structured query language (SQL). It discusses that a DBMS allows for the creation, maintenance and control of access to a database. It also describes the basic processes supported by a DBMS, including storing, manipulating, querying and updating database content. The document then covers how data is organized in a database through concepts like database files, tables, records, fields and data types. It provides examples to illustrate these concepts. Finally, it describes the different types of SQL statements like data definition language, data manipulation language and database control language statements.
This document contains study material prepared by D.GAYA, Assistant Professor of Computer Science at Pondicherry University Community College, for the subject Relational Database Management System. It covers various topics related to SQL including basic SQL reports and commands, data types, joins, DDL, DML, DCL commands, and binary data types. Examples are provided to explain concepts such as creating and dropping databases, creating tables, commenting in SQL, and using the TO_HEX and HEX_TO_BINARY functions for binary data.
This document provides an introduction and overview of PL/SQL. It discusses that PL/SQL is Oracle's procedural language extension for SQL and allows for transactions processing and block structuring. The document then covers various PL/SQL concepts like blocks, data types, control structures, variables and SQL operations within PL/SQL code.
This document provides an overview of database concepts including relational databases, database management systems (DBMS), relational database management systems (RDBMS), SQL, and database tools like SQL*Plus. Key topics covered include retrieving and storing data, working with dates and times, using functions, and writing subqueries. The document also lists common SQL statements and clauses and provides examples of concepts like inline views.
SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987
This document provides an overview of SQL including its introduction, database architectures, data types, keys, built-in functions, commands, joins, views, indexes, triggers, schemas and more. SQL is a tool for organizing, managing and retrieving data from a database. It allows users to define data structure, retrieve, manipulate and control access to data. The document discusses single database, multiple database and multi-location architectures. It also covers data types like character, numeric, date and LOB for Oracle.
This document provides an overview of SQL and database concepts through 20 pages. It discusses:
- The history and purpose of SQL as a standard language for operating on relational databases.
- Different SQL data types including numeric, date/time, and string types. It describes the allowed values and formats for each type.
- Key concepts in database management including the data definition language (DDL) for creating and modifying database structures, the data manipulation language (DML) for querying and modifying data, and different types of keys and constraints.
- Specific SQL commands like CREATE, DROP, INSERT, UPDATE, DELETE, and SELECT along with syntax and examples.
The document serves as an introduction and
The document provides information about Structured Query Language (SQL) including its basic concepts, data types, CREATE TABLE and INSERT commands, constraints, operators and data modifications. It defines key SQL concepts such as relations, attributes, tuples, primary keys, foreign keys and discusses SQL's capabilities for data definition, manipulation, queries and transaction control. Examples are given for creating a table and inserting records into the table.
The document provides an introduction to SQL and database concepts. It defines key terms like data, information, fields, records, databases, tuples, attributes, primary keys, and foreign keys. It also describes SQL commands for creating tables, inserting data, querying data using conditions, sorting results, and using aggregate functions. Common data types and constraints in SQL are explained. Functions for mathematical operations, string manipulation and date/time are also listed.
The document provides an overview of Oracle for beginners, including the different editions of Oracle database, data types in Oracle such as character, numeric, date, and LOB data types. It also discusses how to create and alter Oracle tables, including adding, modifying and dropping columns, as well as renaming tables and columns. Primary keys in Oracle tables are also covered at a high level.
Dive deeper into the essentials of MySQL with this hands-on session focused on schema design, data types, and table creation. This presentation is a continuation of foundational database concepts and is designed to help learners move from theory to practice in crafting effective MySQL databases.
Key highlights:
Detailed breakdown of tables, columns, primary keys, and foreign keys
Relationship types in relational databases (1-to-1, 1-to-many, many-to-many)
Comprehensive overview of MySQL data types: CHAR, VARCHAR, TEXT, DECIMAL, FLOAT, ENUM, BLOB, and more
Syntax and best practices for creating and deleting databases and tables
Practical guide to designing high-performance, scalable, and reliable schemas
With real-world examples and simplified explanations, this session helps you build and manage robust MySQL databases from scratch — a must-know skill for data-driven roles.
Oracle is an object-relational database management system. It is the leading RDBMS vendor worldwide. Every Oracle database contains logical structures like tablespaces, schema objects, and physical structures like data files, redo log files, and a control file. SQL is the standard language used for storing, manipulating, and retrieving data from relational databases like Oracle. PL/SQL adds procedural functionality to SQL and is tightly integrated with the Oracle database.
Oracle is an object-relational database management system. It is the leading RDBMS vendor worldwide. Every Oracle database contains logical structures like tablespaces, schema objects, and physical structures like data files, redo log files, and a control file. SQL is the standard language used for storing, manipulating, and retrieving data from relational databases like Oracle. PL/SQL adds procedural logic to SQL and is tightly integrated with Oracle databases. It allows developers to define functions and procedures to manipulate data in the database.
SQL is a standard language used to create, access, and manipulate databases. It allows users to define, manipulate, and control access to data and structures within a database. Some key SQL elements include commands to create and delete tables, retrieve and modify data, and control user access privileges. Common SQL commands are used for data definition (DDL), data manipulation (DML), and transaction control. Constraints like primary keys, foreign keys, unique keys and check constraints are used to define rules to maintain data integrity in SQL tables.
The document discusses various SQL commands and concepts. It begins by defining SQL and explaining its purpose and architecture. It then covers the different types of SQL commands - DDL, DML, DCL, and TCL. Specific commands like CREATE, SELECT, INSERT, UPDATE and DELETE are discussed along with their uses. Data types like NUMBER, CHAR, VARCHAR, DATE and LONG are also explained. The document provides examples of creating a table and altering it using SQL statements.
SQL is a language used to create, access, and manipulate data in databases. SQL statements are categorized into data definition language, data manipulation language, data control language, transaction control language, and embedded SQL statements. Data definition language statements define, alter, or drop database objects. Data manipulation language statements query or manipulate data in existing database objects. Data control language statements grant and revoke privileges to users. Transaction control language statements manage transactions of data manipulation language statements. Embedded SQL statements incorporate other SQL statements into procedural programs.
The document provides an overview of database management systems (DBMS) and structured query language (SQL). It discusses that a DBMS allows for the creation, maintenance and control of access to a database. It also describes the basic processes supported by a DBMS, including storing, manipulating, querying and updating database content. The document then covers how data is organized in a database through concepts like database files, tables, records, fields and data types. It provides examples to illustrate these concepts. Finally, it describes the different types of SQL statements like data definition language, data manipulation language and database control language statements.
This document contains study material prepared by D.GAYA, Assistant Professor of Computer Science at Pondicherry University Community College, for the subject Relational Database Management System. It covers various topics related to SQL including basic SQL reports and commands, data types, joins, DDL, DML, DCL commands, and binary data types. Examples are provided to explain concepts such as creating and dropping databases, creating tables, commenting in SQL, and using the TO_HEX and HEX_TO_BINARY functions for binary data.
This document provides an introduction and overview of PL/SQL. It discusses that PL/SQL is Oracle's procedural language extension for SQL and allows for transactions processing and block structuring. The document then covers various PL/SQL concepts like blocks, data types, control structures, variables and SQL operations within PL/SQL code.
This document provides an overview of database concepts including relational databases, database management systems (DBMS), relational database management systems (RDBMS), SQL, and database tools like SQL*Plus. Key topics covered include retrieving and storing data, working with dates and times, using functions, and writing subqueries. The document also lists common SQL statements and clauses and provides examples of concepts like inline views.
SQL stands for Structured Query Language
SQL lets you access and manipulate databases
SQL became a standard of the American National Standards Institute (ANSI) in 1986, and of the International Organization for Standardization (ISO) in 1987
This document provides an overview of SQL including its introduction, database architectures, data types, keys, built-in functions, commands, joins, views, indexes, triggers, schemas and more. SQL is a tool for organizing, managing and retrieving data from a database. It allows users to define data structure, retrieve, manipulate and control access to data. The document discusses single database, multiple database and multi-location architectures. It also covers data types like character, numeric, date and LOB for Oracle.
This document provides an overview of SQL and database concepts through 20 pages. It discusses:
- The history and purpose of SQL as a standard language for operating on relational databases.
- Different SQL data types including numeric, date/time, and string types. It describes the allowed values and formats for each type.
- Key concepts in database management including the data definition language (DDL) for creating and modifying database structures, the data manipulation language (DML) for querying and modifying data, and different types of keys and constraints.
- Specific SQL commands like CREATE, DROP, INSERT, UPDATE, DELETE, and SELECT along with syntax and examples.
The document serves as an introduction and
The document provides information about Structured Query Language (SQL) including its basic concepts, data types, CREATE TABLE and INSERT commands, constraints, operators and data modifications. It defines key SQL concepts such as relations, attributes, tuples, primary keys, foreign keys and discusses SQL's capabilities for data definition, manipulation, queries and transaction control. Examples are given for creating a table and inserting records into the table.
The document provides an introduction to SQL and database concepts. It defines key terms like data, information, fields, records, databases, tuples, attributes, primary keys, and foreign keys. It also describes SQL commands for creating tables, inserting data, querying data using conditions, sorting results, and using aggregate functions. Common data types and constraints in SQL are explained. Functions for mathematical operations, string manipulation and date/time are also listed.
The document provides an overview of Oracle for beginners, including the different editions of Oracle database, data types in Oracle such as character, numeric, date, and LOB data types. It also discusses how to create and alter Oracle tables, including adding, modifying and dropping columns, as well as renaming tables and columns. Primary keys in Oracle tables are also covered at a high level.
Dive deeper into the essentials of MySQL with this hands-on session focused on schema design, data types, and table creation. This presentation is a continuation of foundational database concepts and is designed to help learners move from theory to practice in crafting effective MySQL databases.
Key highlights:
Detailed breakdown of tables, columns, primary keys, and foreign keys
Relationship types in relational databases (1-to-1, 1-to-many, many-to-many)
Comprehensive overview of MySQL data types: CHAR, VARCHAR, TEXT, DECIMAL, FLOAT, ENUM, BLOB, and more
Syntax and best practices for creating and deleting databases and tables
Practical guide to designing high-performance, scalable, and reliable schemas
With real-world examples and simplified explanations, this session helps you build and manage robust MySQL databases from scratch — a must-know skill for data-driven roles.
Oracle is an object-relational database management system. It is the leading RDBMS vendor worldwide. Every Oracle database contains logical structures like tablespaces, schema objects, and physical structures like data files, redo log files, and a control file. SQL is the standard language used for storing, manipulating, and retrieving data from relational databases like Oracle. PL/SQL adds procedural functionality to SQL and is tightly integrated with the Oracle database.
Oracle is an object-relational database management system. It is the leading RDBMS vendor worldwide. Every Oracle database contains logical structures like tablespaces, schema objects, and physical structures like data files, redo log files, and a control file. SQL is the standard language used for storing, manipulating, and retrieving data from relational databases like Oracle. PL/SQL adds procedural logic to SQL and is tightly integrated with Oracle databases. It allows developers to define functions and procedures to manipulate data in the database.
GiacomoVacca - WebRTC - troubleshooting media negotiation.pdfGiacomo Vacca
Presented at Kamailio World 2025.
Establishing WebRTC sessions reliably and quickly, and maintaining good media quality throughout a session, are ongoing challenges for service providers. This presentation dives into the details of session negotiation and media setup, with a focus on troubleshooting techniques and diagnostic tools. Special attention will be given to scenarios involving FreeSWITCH as the media server and Kamailio as the signalling proxy, highlighting common pitfalls and practical solutions drawn from real-world deployments.
保密服务明尼苏达大学莫里斯分校英文毕业证书影本美国成绩单明尼苏达大学莫里斯分校文凭【q微1954292140】办理明尼苏达大学莫里斯分校学位证(UMM毕业证书)原版高仿成绩单【q微1954292140】帮您解决在美国明尼苏达大学莫里斯分校未毕业难题(University of Minnesota, Morris)文凭购买、毕业证购买、大学文凭购买、大学毕业证购买、买文凭、日韩文凭、英国大学文凭、美国大学文凭、澳洲大学文凭、加拿大大学文凭(q微1954292140)新加坡大学文凭、新西兰大学文凭、爱尔兰文凭、西班牙文凭、德国文凭、教育部认证,买毕业证,毕业证购买,买大学文凭,购买日韩毕业证、英国大学毕业证、美国大学毕业证、澳洲大学毕业证、加拿大大学毕业证(q微1954292140)新加坡大学毕业证、新西兰大学毕业证、爱尔兰毕业证、西班牙毕业证、德国毕业证,回国证明,留信网认证,留信认证办理,学历认证。从而完成就业。明尼苏达大学莫里斯分校毕业证办理,明尼苏达大学莫里斯分校文凭办理,明尼苏达大学莫里斯分校成绩单办理和真实留信认证、留服认证、明尼苏达大学莫里斯分校学历认证。学院文凭定制,明尼苏达大学莫里斯分校原版文凭补办,扫描件文凭定做,100%文凭复刻。
特殊原因导致无法毕业,也可以联系我们帮您办理相关材料:
1:在明尼苏达大学莫里斯分校挂科了,不想读了,成绩不理想怎么办???
2:打算回国了,找工作的时候,需要提供认证《UMM成绩单购买办理明尼苏达大学莫里斯分校毕业证书范本》【Q/WeChat:1954292140】Buy University of Minnesota, Morris Diploma《正式成绩单论文没过》有文凭却得不到认证。又该怎么办???美国毕业证购买,美国文凭购买,【q微1954292140】美国文凭购买,美国文凭定制,美国文凭补办。专业在线定制美国大学文凭,定做美国本科文凭,【q微1954292140】复制美国University of Minnesota, Morris completion letter。在线快速补办美国本科毕业证、硕士文凭证书,购买美国学位证、明尼苏达大学莫里斯分校Offer,美国大学文凭在线购买。
美国文凭明尼苏达大学莫里斯分校成绩单,UMM毕业证【q微1954292140】办理美国明尼苏达大学莫里斯分校毕业证(UMM毕业证书)【q微1954292140】成绩单COPY明尼苏达大学莫里斯分校offer/学位证国外文凭办理、留信官方学历认证(永久存档真实可查)采用学校原版纸张、特殊工艺完全按照原版一比一制作。帮你解决明尼苏达大学莫里斯分校学历学位认证难题。
主营项目:
1、真实教育部国外学历学位认证《美国毕业文凭证书快速办理明尼苏达大学莫里斯分校修改成绩单分数电子版》【q微1954292140】《论文没过明尼苏达大学莫里斯分校正式成绩单》,教育部存档,教育部留服网站100%可查.
2、办理UMM毕业证,改成绩单《UMM毕业证明办理明尼苏达大学莫里斯分校毕业证样本》【Q/WeChat:1954292140】Buy University of Minnesota, Morris Certificates《正式成绩单论文没过》,明尼苏达大学莫里斯分校Offer、在读证明、学生卡、信封、证明信等全套材料,从防伪到印刷,从水印到钢印烫金,高精仿度跟学校原版100%相同.
3、真实使馆认证(即留学人员回国证明),使馆存档可通过大使馆查询确认.
4、留信网认证,国家专业人才认证中心颁发入库证书,留信网存档可查.
《明尼苏达大学莫里斯分校国外学历认证美国毕业证书办理UMM100%文凭复刻》【q微1954292140】学位证1:1完美还原海外各大学毕业材料上的工艺:水印,阴影底纹,钢印LOGO烫金烫银,LOGO烫金烫银复合重叠。文字图案浮雕、激光镭射、紫外荧光、温感、复印防伪等防伪工艺。
高仿真还原美国文凭证书和外壳,定制美国明尼苏达大学莫里斯分校成绩单和信封。成绩单办理UMM毕业证【q微1954292140】办理美国明尼苏达大学莫里斯分校毕业证(UMM毕业证书)【q微1954292140】做一个在线本科文凭明尼苏达大学莫里斯分校offer/学位证研究生文凭、留信官方学历认证(永久存档真实可查)采用学校原版纸张、特殊工艺完全按照原版一比一制作。帮你解决明尼苏达大学莫里斯分校学历学位认证难题。
明尼苏达大学莫里斯分校offer/学位证、留信官方学历认证(永久存档真实可查)采用学校原版纸张、特殊工艺完全按照原版一比一制作【q微1954292140】Buy University of Minnesota, Morris Diploma购买美国毕业证,购买英国毕业证,购买澳洲毕业证,购买加拿大毕业证,以及德国毕业证,购买法国毕业证(q微1954292140)购买荷兰毕业证、购买瑞士毕业证、购买日本毕业证、购买韩国毕业证、购买新西兰毕业证、购买新加坡毕业证、购买西班牙毕业证、购买马来西亚毕业证等。包括了本科毕业证,硕士毕业证。
APNIC Policy Update and Participation, presented at TWNIC 43rd IP Open Policy...APNIC
Sunny Chendi, the Senior Regional Advisor of Membership and Policy at APNIC, presented the APNIC policy update at the 6th ICANN APAC-TWNIC Engagement Forum and 43rd TWNIC OPM held in Taipei from 22 to 24 April 2025.
Global Networking Trends, presented at TWNIC 43rd IP Open Policy MeetingAPNIC
Jia Rong Low, Director General at APNIC, presented on 'Global Networking Trends' at the 6th ICANN APAC-TWNIC Engagement Forum and 43rd TWNIC OPM held in Taipei from 22 to 24 April 2025.
What Is Cloud-to-Cloud Migration?
Moving workloads, data, and services from one cloud provider to another (e.g., AWS → Azure).
Common in multi-cloud strategies, M&A, or cost optimization efforts.
Key Challenges
Data integrity & security
Downtime or service interruption
Compatibility of services & APIs
Managing hybrid environments
Compliance during migration
Fractures In Chronic Kidney Disease Patients - Copy (3).pptxChaitanJaunky1
Ad
SQL-1.pptx for database system and system query language
1. • SQL stands for Structured Query Language.
• Oracle is a Relational Database Management System (RDBMS). It is used for storing
and managing data in relational database management system (RDMS).
• Oracle being RDBMS, stored data in tables called relations.
• These relations are data can be representation in two-dimensional
• The rows are called tuples it represents records
• The columns called attributes it represents pieces of information contained in the
record.
• It is a standard language for Relational Database System. It enables a user to create,
read, update and delete relational databases and tables.
• Structure query language is not case sensitive. Generally, keywords of SQL are written
in uppercase.
• Statements of SQL are dependent on text lines. We can use a single SQL statement on
one or multiple text line.
Introduction to ORACLE
2. History of SQL
• The SQL language was originally developed at the IBM research laboratory in San
José, in connection with a project developing a prototype for a relational database
management system called System R in the early 70s.
• The first database management systems based on SQL became available
commercially by the end of the 70s. At the same time, relational database
management systems based on other languages were published.
• In 1986, the first SQL standard was approved by ISO and ANSI.
• In 1989, an integrity enhancement was appproved by ISO, containing, among
other features, the specification possibility for keys, foreign keys and some other
constraints
• In 1992, the new version SQL-92 (also called SQL2) was approved. It contained large
enhancements to the language.
• the basic level, mainly containing the core of the old SQL/89
the intermediate level, containing new data types, operations and structures
the full SQL with even more data types and structures
3. • In 1995, the SQL/CLI call level interface was approved, i.e. the interface
specification for use through programs. The standard specifies the ODBC interface.
• In 1996, the SQL/PSM (persistent stored modules) was approved as a database
procedure specification language.
• In 1999, the new version SQL-99 (also called SQL3) was approved. The standard is
divided into five parts.
1. Framework (introduction)
2. Foundation (core)
3. CLI (call level interface)
4. PSM (persistent stored modules)
5. Bindings (to programming languages)
• The embedding of SQL into a Java program (SQLJ) was approved on 2000. At least
the standards for multimedia enhancements and data warehouse features are being
developed.
4. DATA TYPES in SQL
It specified which type data and size can be stored in a specific field or it specified the
field size and type in a file.
a. Number(L,D)
b. Integer
c. Smallint
d. Decimal(l,d)
a. Number(L,D):
1. L means length, D means Decimal numbers
2. The declaration Number (7,2) indicates numbers
3. That will be stored with two decimal places and may be up to seven
digits long,
4. It includes the sign and the decimal place. Examples: 12.32, -134.23
Syntax: Column-name data-type (L);
or
Column-name data-type (L, D)
Ex:
Sno number (3);
or
sno number(7,2);
1. Numeric:
The number data type is used to store zero, positive and negative values. User can specify a fixed point
number using the following form
There are different types of data types
5. b. Integer:
• It may be abbreviated as INT
• Integers are (whole) counting numbers,
• So they cannot be used to store numbers that
require decimal places
c. Smallint:
• Like Integer, but limited to integer values up to six
digits.
• If your integer values are relatively small, use smallint
instead of Int.
Syntax:
Column-name data-type (L);
Ex:
Sno integer (3);
Syntax:
Column-name data-type (L);
Ex:
Sno smallint(3);
age smallint(3);
d. Decimal(l,d)
1. Like the number specification, but the storage length is a
minimum specification.
2. That is, greater lengths are acceptable, but smller ones are
not.
3. Decmal (9,2), decimal(9), and decimal are all acceptable.
Syntax:
Column-name data-type (L);
or
Column-name data-type (L, D)
Ex:
Sno decimal (3);
or
Ssalary decimal (7,2);
6. 2. Character
The character data type is used to store character ( alphanumeric) data. This can be fixed length or variable
length
a. Char(L)
b. Varchar(L) or Varchar2(L)
a. Char(L)
• Fixed-length character data fro up to 255 characters.
• If you store strings that are not as long as the char parameter value
• The remaining spaces are left unused.
• Therefore, if you specify char (25), each stored as 25 characters
Syntax:
Column-name data-type (L);
Ex:
city char(18);
b. Varchar (L) or Varchar2(L)
• Variable-length character data
• The designation varchar2 (25) will let you store characters long.
• However, varchar will not leave unused spaces.
• Oracle automatically converts varchar to varchar2
Syntax:
Column-name data-type (L);
Ex:
Sname varchar(25);
Syntax:
Column-name data-type (L);
Ex:
Sname varchar2(25);
7. 3. DATE
• The Date data type is used to store date and time information.
• For each date value the information stored is, Century, Year,
Month, Day, Hour, Minute, Second
• The default format of the date data type is ‘DD-MON-YY’.
• The format can be changed with NLS_DATE_FORMAT
command.
Syntax:
Column-name DATE
Ex: date_of_birth date
4. Raw (Size):
Stores binary data of length size. Maximum size is 2000 bytes. One must have to specify size with
RAW type data, because by default it does not specify any size.
6. LOB:
is use to store unstructured information such as sound and video clips, pictures up to 4 GB size.
5. Long Raw:
Store binary data of variable length up to 2GB (Gigabytes).
8. 7. CLOB:
A Character Large Object containing fixed-width multi-byte characters. Varying width
character sets are not supported. Maximum size is 4GB.
9. BFILE:
Contains a locator to a large Binary File stored outside the database. Enables byte stream
I/O access to external LOBs residing on the database server. Maximum size is 4GB.
8. BLOB:
To store a Binary Large Object such a graphics, video clips and sound files.
Maximum size is 4GB.
9. SQL
Commands
• SQL commands are instructions. It is used to communicate with the database. It
is also used to perform specific tasks, functions, and queries of data.
• SQL can perform various tasks like create a table, add data to tables, drop
the table, modify the table, set permission for users.
• Commands can be classified into five types
10. 1. Data Definition Language (DDL)
• DDL changes the structure of the table like creating a table, deleting a table,
altering a table, etc.
• All the command of DDL are auto-committed that means it permanently save all
the changes in the database.
Here are Five commands that come under DDL:
I. CREATE
II. ALTER
III.DROP
IV. RENAME
V. TRUNCATE
11. I. CREATE:
It is used to create the database or its objects(like table, index, function, views, procedure, triggers. . .).
Rules for defining table name:
1. Table name always start with an alphabet.
2. The length of table name and column name
cannot exceed more than 30 characters.
3. Table name cannot allow blank spaces, hyphens
but it allows underscore as special character.
4. Table name cannot contain oracle reserve words.
5. Every column in the table must be separated by
comma(,).
The syntax is,
create table <table_name>(
col1 data_type(size),
col2 data_type(size),
.
.
.
Coln data_type(size));
Ex:
create table student
(sno number(4),
name varchar2(30),
fname varchar2(30),
gender char);
12. • To change (alter) table structure by changing attribute character and by adding columns.
• All changes in the table structure are made by using the ALTER TABLE command.
• ADD, MODIFY and DROP keywords
• That produces the specific change user want to create
• Use ADD to add a column, MODIFY to change column characteristics and DROP to delete a column
from a table Most RDBMSs do not allow you to delete a column (unless the column does not
contain any value).
• The alter table command can also be used to add table constraints.
II. ALTER
Ex:-
SQL> alter table student add(Age number(3));
Table altered.
ADDING A COLUMN:
Alter an existing table by adding one or more columns
Syntax:
Alter table table-name add (column name <data type> (size));
13. EX:-SQL> alter table student modify(sno decimal(3,1));
Table altered.
CHANGING (MODIFY) A COLUMNS DATA TYPE:
Some RDBMSs such as oracle, do not let you change data type unless the column to be changed is empty.
Syntax: Alter table table-name modify (column name <data type>
(size));
EX:SQL> alter table student modify (sname varchar2(40));
CHANGING (MODIFY) A COLUMN’S DATA CHARACTERISTICS
The column to be changed already contains data, make changes in the column’s characteristics if those
changes do not alter the data type. Increase the width of the column size.
Syntax: Alter table table-name modify (column-name data-type (new size));
14. RESTRICTION ON ALTER COMMAND:
The alter table command cannot perform the following
1. Change the name of the table
2. Change the name of the column
3. Decrease the size of a column it table data exists.
DROPPING A COLUMN:
1. User wants to delete a table column by using drop
2. Some RDBMSs impose restrictions on attribute deletion.
3. The attribute that are involved in foreign key relationships not delete an attribute of table that
contains only that one attribute.
Syntax: Alter table-table-name drop column column-name;
Ex: SQL> alter table student drop column age;
15. 3. Rename:
It is used to rename an object existing in the database.
The syntax is,
rename<old_name> to <new_name>;
ex:rename student to std;
4. Drop:
It is used to delete the database objects from the database permanently.
The syntax is,
drop table <table_name>;
ex:drop table std;
5. Truncate:
It is used to remove all records from a table, including all spaces allocated for the
records are removed.
The syntax is,
truncate table <table_name>;
ex: truncate table std;
16. DML (Data manipulation language)
These commands manipulate of data present in database.
The DML commands are
I INSERT
II UPDATE
III DELETE
I. INSERT:
It is used to insert the data into the database objects.
The preceding data entry lines:
1. The row contents are entered between parentheses. Note that the first character after value is a
parenthesis and that the last character in the command sequence is also a parenthesis.
2. Character (String) and date value must be entered between apostrophes (‘).
3. Numerical entries are not enclosed in apostrophes.
4. Attribute entries are separated by commas.
5. A value is required for each column in the table.
17. Syntax: INSERT INTO tablename VALUES( value1, value2, value3……);
SQL>insert into student values(1,'ram‘,’venkatesh’,’Male’);
1 row Inserted
SQL>insert into student values(2,’Hari’,’Ramudu,’Male’);
1 row Inserted
SQL>insert into student values(3,’krishna‘,’Narayana’,’Male’);
1 row Inserted
SQL>insert into student values(4,’Rahul ‘,’varun’,’Male’);
1 row Inserted
SQL>insert into student values(5,’Swathi‘,’venkatesh’,’FeMale’);
INSERTING ROWS WITH OPTIONAL ATTRIBUTES
The attributes that have required values, by listing the attribute names inside
parentheses after the table name.
Syntax: INSERT INTO tablename (cumnname, columname…..)values(value1,value2….);
SQL> insert into student (sno, sname)values(9,'saran');
18. Ex: update std set gender=’f’; -- it will update all rows in the table
update std set gender=’f’ where sno=1; -- it will update specified row in the table.
II UPDATE:
It is used to update existing data within a table. The syntax is,
update<table_name> set <col_name> =
<value> [where <condition>];
ex: delete from std where sno=1; -- it will delete specified row in the table.
Delete from std; -- it will delete all rows in the table
III DELETE:
It is used to delete records from a database table. The syntax is:
delete from <table_name> [where <condition>];
19. A. Commit
B. Rollback
C. Savepoint
Transaction Control Language (TCL)
1. These commands deals with the transaction within the database.
2. A transaction executable statements and end explicitly with either rollback or
commit statement and implicitly.
Syntax: COMMIT [WORK];
Ex: COMMIT;
A. COMMIT (SAVING TABLE CHANGES)
1. It is used to permanently save any transaction into the database.
2. Any changes made to the table contents are not saved on disk until user close the database,
• The COMMIT command permanently saves all changes-
• Such as rows added, attributes modified, and rows delete to any
table in the database.
20. 1. ROLLBACK command work like undo command.
2. Restore the database to its previous condition with the ROLLBACK command.
3. To restore the data to their pre-change condition.
Syntax: ROLLBACK;
Ex: ROLLBACK
B. ROLLBACK ( RESTORING TABLE CONTENTS )
21. Ex: savepoint s1;
/*Ex: SQL> insert into emp values(12,’manju’);
SQL>insert into emp values(13,’sai’);
SQL>savepoint s1;
SQL> insert into emp values(14,’vani’);
SQL>insert into emp values(15,’anu’);
SQL>savepoint s2;
SQL> insert into emp values(16,’rani’);
SQL>insert into emp values(17,’vasu’);
SQL>rollback to s2;*/
C. SAVE POINT:
1. Save point are like markers to divide a lengthy transaction to smaller transactions.
2. Save points are used in conjunction (Combination) with rollback,
3. To rollback portions of the current transaction.
Syntax: savepoint <savepointname>;
1. In the above example we have to define two savepoint
markers.
2. When rollback to s2 is given, whatever transactions
happened after savepoint s2 will be undone.
22. Here
• privilege_name is the access right or privilege granted to the user. Some of the access rights are
ALL, EXECUTE, and SELECT.
• object_name is the name of an database object like TABLE, VIEW, STORED PROC and
SEQUENCE.
• user_name is the name of the user to whom an access right is being granted.
• public is used to grant access rights to all users.
• WITH GRANT OPTION - allows a user to grant access rights to other users.
Ex: grant all on std to user1;
DCL(Data control Language)
1. These commands mainly deal with the rights, permissions and other controls of the database system.
2. Two types of DCL commands
a. GRANT
b. REVOKE.
3. Only Database Administrator's or owner's of the database object can provide/remove privileges (rights) on a
database object.
a. Grant: It is used to provide access or privileges on the database objects to the users.
The Sntax is;
grant<privilege_name> ON <object_name> TO <user_name |PUBLIC> [WITH GRANT OPTION];
23. Revoke:
It is used to removes user access rights or privileges to the database objects.
The syntax is,
revoke<privilege_name> on <object_name> from <user_name |PUBLIC >;
Ex: revoke all on std from user1;
24. The select statement retrieves information from the data base.
The syntax is,
select *[ALL/DISTINCT/Col1,Col2…Coln/expression/alias] from <table_name>
[where<condition>]
[group by <col>]
[having<condition>]
[order by <col>ASC/DESC];
Here
Select - retrieve one or more columns
* - select all columns
Distinct - suppress duplicates
Column/expression - selects the name column or an expression
Alias - gives selected columns different headings
From table - specifies the table containing the columns.
SELECT
DQL(Data Query Language)
25. Select specific columns
Syntax:
Select column-name1, column-name2 ……… from
table-name;
Ex:
Select sno, sname from std;
Selecting distinct rows:
To select specific rows from a table we include a
‘where’ clause in the select command.
SQL> Select distinct sname from std;
Select command with ‘where’ clause
To select specific rows from a table we include a
‘where’ clause in the select command.
SQL>select *from std where sno=12;
Select with order by clause command:
This clause is used to arrange rows in ascending
or descending order.
SQL> Select * from std order by sname;
Group by Clause
1. Group by clause can be used to divide the
rows in a table into smaller groups.
2. Group function can be used to return
summary information for each group.
Select deptno,min(sal) from emp group by
deptno;
Select all columns
Syntax:
Select * from table-name;
Ex:
Select * from std;
26. 1. Domain Integrity Constraints
a. Not null b. Check
2. Entity Integrity Constraints
a. Unique b. Default c. Primary key
3. Referential Constraint
a. Foreign key
CONSTRAINTS
• Constraint is a rule that can be applied on a table or a column of a table.
• Constraints can column level (or) table level column level constraints can be apply a column a
table level constraints can be apply a whole table.
• These ensures the accuracy and reliability of data in the Table.
• If these is any violation between the constraint and the data action, the action is aborted.
• prevents user from entering invalid data into tables are called constraints.
Constraints can be categorized into following,
27. 1. Domain Integrity constraints
a. Not Null
1. By default all columns in a table allow NULL values.
2. When a NOT NULL constraint is enforced on a column in a table, It will not allow NULL values
into that column. But It will allow duplicates.
Example:
create table std(sno number(4) constraint en0_not not null,
sname varchar2(20),
fname varchar2(20)
gender char(10),
course varchar2(20));
Syntax:
Create table <table name> (<column name> <data type> constraint <constraint name> NOT NULL);
28. b. Check constraint
1. These are rules govern logical expressions or Boolean expressions. specifies a condition that must be true.
Syntax:
Create table <table name> (<column name> <data type> constraint <constraint name> check
(column name with condition));
Example:
Create table stud (marks number (5) constraint c1 check (marks>35));
29. 2. Entity Integrity Constraints.
a. Unique
1. This constraint allows only unique values to be stored in the column.
2. Oracle rejects duplication of records when the unique key constraint is used.
3. It can also allow NULL values. Since two NULL values are not allowed because it is duplicate.
Syntax:
Create table <table name> (<column name> <data type> constraint <constraint name> unique (column
name));
Ex: create table item(item_no number(4) constaint eno_uni unique,
iname varchar2(20),
qty number(4),
price number(5,2)
amount number(8,2));
30. b. Default constraint:
1. Its read automatically value when user not enter value
c. Primary key constraint:
1. It avoids duplication of rows and does not allow
NULL values.
2. Primary key is the combination of NOT NULL and
UNIQUE.
3. Primary key is a single field or combination of
fields that uniquely defines record.
4. Table can have only one primary key.
5. In oracle a primary key cannot contain more than
32 columns.
6. It is also used to set the relations between the
tables.
Syntax:
Create table <table name> (<column name> <data type>
constraint <constraint name> primary key);
Ex:
Create table student(sno number(10) constraint P primary key,
sname varchar2(10));
Syntax:
Create table <table name> (<Column name> <data type><Default> <value>)
Ex:
CREATE TABLE student(id number (3), name varchar2 (20) , college varchar2(30) default ‘Sri Ramakrishna Degree
College ’);
31. Ex: create table product_details
( product_no number(5),
product_name varchar2(25),
product_price number(11,2),
constraint pk1 primary key(product_no, product_name, product_price));
COMPOSITE PRIMARY KEY :
If two or more attributes together form primary key then it is called composite key. the
combination of columns values should be unique. Composite primary key is always a table level
constraint. we cannot go for column level.
Syntax: constraint <constraint_name> <constraint_type>(col1,col2...);
32. 3. Referential Constraint
a. Foreign key
1. The referential integrity constraints enforce (impose) the relationship between the tables
2. Foreign key is a primary key in the same table or another table It helps in creating a parent
child relation ships between the tables.
3. A referential integrity constraint assigns a column as a foreign key.
4. Child table primary key is called foreign key
5. Parent table primary key is called referenced key is called parent table.
Syntax:
Create table <table name> (<column name> <data type>, constraint <constraint name> references <table
name> (column name));
33. Example :
Create table student (Stud_ID number (10) primary key,
Stu_Name varchar 2(25),
Cource char) 20));
Create Table Department ( Dept_name varchar (120) NOT NULL,
Stud_Id number, foreign key (Stud_Id) Reference Student (Stud _Id));
34. Lower: This string function convert input string in to lower sting
Ex: select lower(‘ORACLE’) from dual; --- oracle
Upper: This string function will convert input string into upper sting
Ex: select upper(‘oracle’) from dual; ---ORACLE
Initcap (Initial cap): This string function is used to capitalize first character of the input string.
Ex: select initcap(‘oracle’) from dual; --Oracle
Functions:
functions take arguments and always return value. Sql supports Single row and Multiple row
functions.
Single row functions: These functions operate on single rows only and return one result per row. The
single row functions are character, number, date and conversion functions.
Character functions: Accept character input and can return both character and number values.
The character functions are lower, upper, initcap, substr, instr, lpad, rpad, ltrim, rtrim, replace,
length, Translate, ascii, chr.
35. Length: When the length function is used in a query. It returns length of the input string.
Syntax: Length(string)
Ex:SQL>select length(‘srdc’) from dual; ---4
Substr: It fetches out a piece of the string beginning at start and going for count characters, if
count is not specified, the string is fetched from start and goes till end of the string. If count is
not specified, the string is fetched from start and goes till end of the string.
Syntax: substr(column/expression,m[,n])
Ex: select substr(‘welcome’,1) from dual; ---welcome
Select substr(‘welcome’,4,4) from dual; ---come
Select substr(‘welcome’,-4,2) from dual; ---oc
Instr: returns the numeric position of a specific character in a given string.
Syntax: instr (column/expression,’string’,[‘m],[n])
Ex: select instr(‘welcome’,’e’) from dual; --2
Select instr(‘welcome’,’e’,1,2) from dual; --7
36. Number functions
Accept numeric input and return numeric values. The numeric functions are abs, round, ceil, floor,
sqrt, mod, sign, power, sin, cos, tan, trunc, least, greatest, m0d, exp.
Round: round the column expression or value to n decimal places. If n is omitted, no decimal places.
If n is negative, numbers to left of the decimal point are rounded)
Syntax: round(col/expr. n)
Ex: select round(45.923,2), round(45.923,0), round(45.923,-1) from dual;
ABS() : this function always returns positive number.
Syntax: abs(negative number);
Ex: select abs(-100) from dual;
37. LEAST: Returns the least of the specified list of values.
Ex: select least(10,2,45,6) from dual;
Power: this function will return power of raise value of given number
Syntax: power(number,raise)
Ex: select power(4,2) from dual; --- 16
Sqrt: this function return the square root value.
Ex: select sqrt(25) from dual;
GREATEST: Returns the greatest of the specified list of values.
Ex: select greatest(10,2,4) from dual;