This document discusses database management systems and SQL. It provides examples of creating tables, inserting and retrieving data using commands like SELECT, UPDATE, and DELETE. It also covers SQL sublanguages, data types, logical operators, and pattern matching operators. Key points include that a DBMS manages a database using software, SQL is the standard language used to communicate with databases, and tables are used to store data in rows and columns.
Structured Query Language (SQL) is the standard language used to communicate with relational databases. SQL statements are used to perform tasks like retrieving, updating, and managing data. The document discusses SQL commands like SELECT, INSERT, UPDATE, DELETE, and CREATE TABLE. It also covers SQL concepts like data types, joins, constraints, and how to create and alter tables. Entity relationship (ER) diagrams use symbols to illustrate how entities and their attributes relate to each other in a database system.
This document provides an overview of SQL (Structured Query Language). It discusses that SQL is used to define, manipulate, and control data in a relational database. It can define database schemas, insert, modify, retrieve, and delete data from databases. The document also provides a brief history of SQL and describes its main components like DDL, DML, and DCL. It provides examples of common SQL commands and functions. Finally, it discusses SQL Plus which is a basic Oracle utility used to interact with databases through a command line interface.
This document provides an overview of the relational database language SQL. It begins by defining basic data types in SQL like numbers, characters, dates and times. It then discusses the SQL Data Definition Language (DDL) which is used to define and modify database schemas and objects. Specific DDL commands like CREATE, DROP, ALTER, TRUNCATE and RENAME are described. The document also covers the SQL Data Manipulation Language (DML) including commands for queries, inserts, updates and deletes. Additional topics discussed include constraints, indexes, views and the advantages of SQL.
SQL is a standard language for accessing and manipulating relational databases. It allows users to define, manipulate, and control access to data in a database. Some key capabilities of SQL include executing queries to retrieve data, as well as inserting, updating, and deleting records. SQL databases typically contain tables made up of rows and columns that store data. Relationships between tables are defined through primary and foreign keys. Database management systems use SQL to maintain database objects like tables, indexes, and views.
The document provides an overview of SQL commands and syntax for creating and managing databases, tables, and querying data. Key points covered include:
- SQL commands for defining schema (CREATE TABLE), manipulating data (INSERT, UPDATE, DELETE), and querying data (SELECT).
- Data types, constraints, indexes and joins.
- Examples of SQL syntax for common queries and operations like filtering, sorting, aggregation, and joining tables.
DATABASE MANAGMENT SYSTEM (DBMS) AND SQLDev Chauhan
(i) DDL (Data Definition Language) is used to define the schema of the database. It is used to create, modify or delete definitions of database objects like tables, indexes, views etc.
(ii) DML (Data Manipulation Language) is used to manipulate the data present in the database. It is used to insert, update or delete rows/records from tables. Examples are SELECT, INSERT, UPDATE, DELETE statements.
(iii) Primary Key is a column or set of columns in a table that uniquely identifies each row/record in the table. It must contain unique values and cannot contain NULL values.
(iv) Candidate Key is a column or set of columns that can uniquely identify rows/records in a
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
SQL is a standard language used to manage data in relational database systems. The SELECT statement is used to retrieve data from databases. It allows specifying columns, tables, filters and sorting. Common clauses include SELECT, FROM, WHERE, ORDER BY, and optional clauses like DISTINCT, GROUP BY and HAVING. Operators allow filtering rows by conditions, ranges, patterns and more. SQL is a non-procedural language used to perform queries, inserts, updates and deletes on a relational database.
This document provides an overview of SQL and MySQL. It discusses that MySQL is an open source relational database management system that uses SQL. SQL allows users to create, access, and manage relational databases. The document then covers relational data models and terminology used in relational databases like tables, rows, columns, primary keys, and foreign keys. It also discusses SQL commands for data definition, manipulation, and control. Finally, it provides examples of SQL queries to retrieve, insert, update and structure data from tables in a MySQL database.
SQL is a standard language for creating and manipulating databases. It allows users to define, manipulate, and control access to data in a database. Some key capabilities of SQL include creating and deleting tables, inserting, updating, and deleting rows of data, retrieving data with queries, and setting access privileges for database users and applications. SQL is supported by many popular database systems like Oracle, MySQL, SQL Server, and PostgreSQL.
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.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
This document provides information about SQL and database management systems. It discusses:
- SQL is a standard language for querying, manipulating, and defining data in databases. It was developed by IBM in the 1970s.
- SQL can be used to perform functions like retrieving data from a database, inserting new records, updating existing records, and deleting records.
- The main components of SQL are DDL, DML, DCL, and DQL which allow creating, modifying and deleting database structures, manipulating data, controlling access to data, and querying data respectively.
- Common SQL statements are discussed including SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE TABLE, and DROP TABLE. Data types and
SQL is a standard language for storing, manipulating and retrieving data in databases. It allows users to access and manipulate data in databases. Some key functions of SQL include executing queries against a database, retrieving data from a database, inserting, updating and deleting records in a database, and creating, altering and dropping database objects like tables.
The document discusses Relational Database Management Systems (RDBMS). It defines key concepts such as data, database, DBMS, RDBMS and provides examples of how data is structured in tables with rows and columns. It also summarizes common RDBMS features like SQL queries, data types, integrity constraints, functions and joins. Overall, the document provides a high-level overview of RDBMS components and functionality.
SQL is a programming language used to manage data in relational database systems. It can be used to create, query, update, and modify relational databases. SQL comprises both data definition and data manipulation languages that allow users to define and modify database schemas as well as store, retrieve, and manage data within databases. Some key advantages of SQL include high speed for retrieving large amounts of data, adherence to well-defined standards, and not requiring coding to manage database systems.
This document provides an overview of tools for PL/SQL development like Oracle SQL Developer and SQL*Plus. It also summarizes key SQL concepts including data definition, manipulation, retrieval, and security commands. Basic SQL elements such as constants, operators, conditions, data types, comments, and variables are also defined.
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.
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 introduction and tutorial to SQL and the Oracle relational database system. It covers the basics of SQL, including defining and querying tables, modifying data, and more advanced query techniques. It also discusses additional Oracle topics like PL/SQL, integrity constraints, triggers, and the overall Oracle system architecture. The tutorial is intended to provide a detailed overview of SQL and how to work with Oracle databases.
This document provides an introduction and tutorial to SQL and the Oracle relational database system. It covers the basics of SQL, including defining and querying tables, modifying data, and more advanced queries using views, joins, and subqueries. It also introduces PL/SQL for database programming and covers other Oracle-specific topics like integrity constraints, triggers, and system architecture. The tutorial is intended to provide a detailed overview of the Oracle database and SQL.
This document provides an introduction and overview of SQL (Structured Query Language). It begins with contact details for instructors and then covers the following key points in 3 sentences or less:
The history of SQL is outlined beginning in 1970 with E.F. Codd's development of the relational database concept through various SQL standards releases. Popular database management systems that support SQL are listed along with an overview of what SQL can do including retrieving, manipulating and defining data. The main components of SQL - DDL, DML, DCL, TCL, and DQL - are defined along with some common commands like SELECT, INSERT, UPDATE, DELETE, CREATE TABLE and more.
SQL.pptx for the begineers and good knowPavithSingh
SQL is a standard language for storing, manipulating and retrieving data in relational databases. It allows users to define database structures, create tables, establish relationships between tables and query data. Popular uses of SQL include inserting, updating, deleting and selecting data from database tables. SQL is widely used across industries for managing large datasets efficiently in relational database management systems like MySQL, Oracle and SQL Server.
Introducing the OSA 3200 SP and OSA 3250 ePRCAdtran
Adtran's latest Oscilloquartz solutions make optical pumping cesium timing more accessible than ever. Discover how the new OSA 3200 SP and OSA 3250 ePRC deliver superior stability, simplified deployment and lower total cost of ownership. Built on a shared platform and engineered for scalable, future-ready networks, these models are ideal for telecom, defense, metrology and more.
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...Ivan Ruchkin
A poster presented by Thomas Waite and Radoslav Ivanov at the 2nd International Conference on Neuro-symbolic Systems (NeuS) in May 2025.
Paper: https://arxiv.org/abs/2502.21308
Abstract: It remains a challenge to provide safety guarantees for autonomous systems with neural perception and control. A typical approach obtains symbolic bounds on perception error (e.g., using conformal prediction) and performs verification under these bounds. However, these bounds can lead to drastic conservatism in the resulting end-to-end safety guarantee. This paper proposes an approach to synthesize symbolic perception error bounds that serve as an optimal interface between perception performance and control verification. The key idea is to consider our error bounds to be heteroskedastic with respect to the system's state -- not time like in previous approaches. These bounds can be obtained with two gradient-free optimization algorithms. We demonstrate that our bounds lead to tighter safety guarantees than the state-of-the-art in a case study on a mountain car.
More Related Content
Similar to Interactive SQL: SQL, Features of SQL, DDL & DML (20)
SQL is a standard language used to manage data in relational database systems. The SELECT statement is used to retrieve data from databases. It allows specifying columns, tables, filters and sorting. Common clauses include SELECT, FROM, WHERE, ORDER BY, and optional clauses like DISTINCT, GROUP BY and HAVING. Operators allow filtering rows by conditions, ranges, patterns and more. SQL is a non-procedural language used to perform queries, inserts, updates and deletes on a relational database.
This document provides an overview of SQL and MySQL. It discusses that MySQL is an open source relational database management system that uses SQL. SQL allows users to create, access, and manage relational databases. The document then covers relational data models and terminology used in relational databases like tables, rows, columns, primary keys, and foreign keys. It also discusses SQL commands for data definition, manipulation, and control. Finally, it provides examples of SQL queries to retrieve, insert, update and structure data from tables in a MySQL database.
SQL is a standard language for creating and manipulating databases. It allows users to define, manipulate, and control access to data in a database. Some key capabilities of SQL include creating and deleting tables, inserting, updating, and deleting rows of data, retrieving data with queries, and setting access privileges for database users and applications. SQL is supported by many popular database systems like Oracle, MySQL, SQL Server, and PostgreSQL.
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.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
1) SQL is a standard language for accessing and manipulating databases. It allows users to define, manipulate, and control access to data in a database.
2) SQL was first introduced in a 1970 research paper and later developed into a language. It became a standard and is now supported by most major databases.
3) SQL allows users to define tables, perform data manipulation like inserts and updates, run queries to retrieve data, and control transactions in the database. It provides powerful and easy to use commands to work with relational databases.
This document provides information about SQL and database management systems. It discusses:
- SQL is a standard language for querying, manipulating, and defining data in databases. It was developed by IBM in the 1970s.
- SQL can be used to perform functions like retrieving data from a database, inserting new records, updating existing records, and deleting records.
- The main components of SQL are DDL, DML, DCL, and DQL which allow creating, modifying and deleting database structures, manipulating data, controlling access to data, and querying data respectively.
- Common SQL statements are discussed including SELECT, INSERT, UPDATE, DELETE, ALTER, CREATE TABLE, and DROP TABLE. Data types and
SQL is a standard language for storing, manipulating and retrieving data in databases. It allows users to access and manipulate data in databases. Some key functions of SQL include executing queries against a database, retrieving data from a database, inserting, updating and deleting records in a database, and creating, altering and dropping database objects like tables.
The document discusses Relational Database Management Systems (RDBMS). It defines key concepts such as data, database, DBMS, RDBMS and provides examples of how data is structured in tables with rows and columns. It also summarizes common RDBMS features like SQL queries, data types, integrity constraints, functions and joins. Overall, the document provides a high-level overview of RDBMS components and functionality.
SQL is a programming language used to manage data in relational database systems. It can be used to create, query, update, and modify relational databases. SQL comprises both data definition and data manipulation languages that allow users to define and modify database schemas as well as store, retrieve, and manage data within databases. Some key advantages of SQL include high speed for retrieving large amounts of data, adherence to well-defined standards, and not requiring coding to manage database systems.
This document provides an overview of tools for PL/SQL development like Oracle SQL Developer and SQL*Plus. It also summarizes key SQL concepts including data definition, manipulation, retrieval, and security commands. Basic SQL elements such as constants, operators, conditions, data types, comments, and variables are also defined.
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.
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 introduction and tutorial to SQL and the Oracle relational database system. It covers the basics of SQL, including defining and querying tables, modifying data, and more advanced query techniques. It also discusses additional Oracle topics like PL/SQL, integrity constraints, triggers, and the overall Oracle system architecture. The tutorial is intended to provide a detailed overview of SQL and how to work with Oracle databases.
This document provides an introduction and tutorial to SQL and the Oracle relational database system. It covers the basics of SQL, including defining and querying tables, modifying data, and more advanced queries using views, joins, and subqueries. It also introduces PL/SQL for database programming and covers other Oracle-specific topics like integrity constraints, triggers, and system architecture. The tutorial is intended to provide a detailed overview of the Oracle database and SQL.
This document provides an introduction and overview of SQL (Structured Query Language). It begins with contact details for instructors and then covers the following key points in 3 sentences or less:
The history of SQL is outlined beginning in 1970 with E.F. Codd's development of the relational database concept through various SQL standards releases. Popular database management systems that support SQL are listed along with an overview of what SQL can do including retrieving, manipulating and defining data. The main components of SQL - DDL, DML, DCL, TCL, and DQL - are defined along with some common commands like SELECT, INSERT, UPDATE, DELETE, CREATE TABLE and more.
SQL.pptx for the begineers and good knowPavithSingh
SQL is a standard language for storing, manipulating and retrieving data in relational databases. It allows users to define database structures, create tables, establish relationships between tables and query data. Popular uses of SQL include inserting, updating, deleting and selecting data from database tables. SQL is widely used across industries for managing large datasets efficiently in relational database management systems like MySQL, Oracle and SQL Server.
Introducing the OSA 3200 SP and OSA 3250 ePRCAdtran
Adtran's latest Oscilloquartz solutions make optical pumping cesium timing more accessible than ever. Discover how the new OSA 3200 SP and OSA 3250 ePRC deliver superior stability, simplified deployment and lower total cost of ownership. Built on a shared platform and engineered for scalable, future-ready networks, these models are ideal for telecom, defense, metrology and more.
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification o...Ivan Ruchkin
A poster presented by Thomas Waite and Radoslav Ivanov at the 2nd International Conference on Neuro-symbolic Systems (NeuS) in May 2025.
Paper: https://arxiv.org/abs/2502.21308
Abstract: It remains a challenge to provide safety guarantees for autonomous systems with neural perception and control. A typical approach obtains symbolic bounds on perception error (e.g., using conformal prediction) and performs verification under these bounds. However, these bounds can lead to drastic conservatism in the resulting end-to-end safety guarantee. This paper proposes an approach to synthesize symbolic perception error bounds that serve as an optimal interface between perception performance and control verification. The key idea is to consider our error bounds to be heteroskedastic with respect to the system's state -- not time like in previous approaches. These bounds can be obtained with two gradient-free optimization algorithms. We demonstrate that our bounds lead to tighter safety guarantees than the state-of-the-art in a case study on a mountain car.
Offshore IT Support: Balancing In-House and Offshore Help Desk Techniciansjohn823664
In today's always-on digital environment, businesses must deliver seamless IT support across time zones, devices, and departments. This SlideShare explores how companies can strategically combine in-house expertise with offshore talent to build a high-performing, cost-efficient help desk operation.
From the benefits and challenges of offshore support to practical models for integrating global teams, this presentation offers insights, real-world examples, and key metrics for success. Whether you're scaling a startup or optimizing enterprise support, discover how to balance cost, quality, and responsiveness with a hybrid IT support strategy.
Perfect for IT managers, operations leads, and business owners considering global help desk solutions.
Dev Dives: System-to-system integration with UiPath API WorkflowsUiPathCommunity
Join the next Dev Dives webinar on May 29 for a first contact with UiPath API Workflows, a powerful tool purpose-fit for API integration and data manipulation!
This session will guide you through the technical aspects of automating communication between applications, systems and data sources using API workflows.
📕 We'll delve into:
- How this feature delivers API integration as a first-party concept of the UiPath Platform.
- How to design, implement, and debug API workflows to integrate with your existing systems seamlessly and securely.
- How to optimize your API integrations with runtime built for speed and scalability.
This session is ideal for developers looking to solve API integration use cases with the power of the UiPath Platform.
👨🏫 Speakers:
Gunter De Souter, Sr. Director, Product Manager @UiPath
Ramsay Grove, Product Manager @UiPath
This session streamed live on May 29, 2025, 16:00 CET.
Check out all our upcoming UiPath Dev Dives sessions:
👉 https://community.uipath.com/dev-dives-automation-developer-2025/
Unlock your organization’s full potential with the 2025 Digital Adoption Blueprint. Discover proven strategies to streamline software onboarding, boost productivity, and drive enterprise-wide digital transformation.
Master tester AI toolbox - Kari Kakkonen at Testaus ja AI 2025 ProfessioKari Kakkonen
My slides at Professio Testaus ja AI 2025 seminar in Espoo, Finland.
Deck in English, even though I talked in Finnish this time, in addition to chairing the event.
I discuss the different motivations for testing to use AI tools to help in testing, and give several examples in each categories, some open source, some commercial.
Agentic AI - The New Era of IntelligenceMuzammil Shah
This presentation is specifically designed to introduce final-year university students to the foundational principles of Agentic Artificial Intelligence (AI). It aims to provide a clear understanding of how Agentic AI systems function, their key components, and the underlying technologies that empower them. By exploring real-world applications and emerging trends, the session will equip students with essential knowledge to engage with this rapidly evolving area of AI, preparing them for further study or professional work in the field.
Fully Open-Source Private Clouds: Freedom, Security, and ControlShapeBlue
In this presentation, Swen Brüseke introduced proIO's strategy for 100% open-source driven private clouds. proIO leverage the proven technologies of CloudStack and LINBIT, complemented by professional maintenance contracts, to provide you with a secure, flexible, and high-performance IT infrastructure. He highlighted the advantages of private clouds compared to public cloud offerings and explain why CloudStack is in many cases a superior solution to Proxmox.
--
The CloudStack European User Group 2025 took place on May 8th in Vienna, Austria. The event once again brought together open-source cloud professionals, contributors, developers, and users for a day of deep technical insights, knowledge sharing, and community connection.
"AI in the browser: predicting user actions in real time with TensorflowJS", ...Fwdays
With AI becoming increasingly present in our everyday lives, the latest advancements in the field now make it easier than ever to integrate it into our software projects. In this session, we’ll explore how machine learning models can be embedded directly into front-end applications. We'll walk through practical examples, including running basic models such as linear regression and random forest classifiers, all within the browser environment.
Once we grasp the fundamentals of running ML models on the client side, we’ll dive into real-world use cases for web applications—ranging from real-time data classification and interpolation to object tracking in the browser. We'll also introduce a novel approach: dynamically optimizing web applications by predicting user behavior in real time using a machine learning model. This opens the door to smarter, more adaptive user experiences and can significantly improve both performance and engagement.
In addition to the technical insights, we’ll also touch on best practices, potential challenges, and the tools that make browser-based machine learning development more accessible. Whether you're a developer looking to experiment with ML or someone aiming to bring more intelligence into your web apps, this session will offer practical takeaways and inspiration for your next project.
European Accessibility Act & Integrated Accessibility TestingJulia Undeutsch
Emma Dawson will guide you through two important topics in this session.
Firstly, she will prepare you for the European Accessibility Act (EAA), which comes into effect on 28 June 2025, and show you how development teams can prepare for it.
In the second part of the webinar, Emma Dawson will explore with you various integrated testing methods and tools that will help you improve accessibility during the development cycle, such as Linters, Storybook, Playwright, just to name a few.
Focus: European Accessibility Act, Integrated Testing tools and methods (e.g. Linters, Storybook, Playwright)
Target audience: Everyone, Developers, Testers
European Accessibility Act & Integrated Accessibility TestingJulia Undeutsch
Interactive SQL: SQL, Features of SQL, DDL & DML
1. Interactive SQL
Dr. P. ISAKKI ALIAS DEVI, M.C.A.,M.Phil.,Ph.D.
Associate Professor,
Department of Computer Applications,
Ayya Nadar Janaki Ammal College.
Sivakasi.
2. SQL
SQL is standard language for making queries in relational database packages such as SQL server,
Ingress, Sybase, Oracleetc.
The ORACLE system uses non-procedural Structured Query Language to communicate with its
databasekernel.
In 1986, the American National Standard Institute (ANSI) made SQL the standard for all DBMS. It’s a
powerful query language and all the applications development tools that ORACLE provides are
SQLbased.
SQL is a non-procedural language since only the task that has to be achieved is specified, not how
to go about doing the job i.e. it provides automatic navigation to the data. The records are processed
set at a time rather than just a record at atime.
SQL does not support any programming language constructs like if..else or while etc, but can be
embedded in other programming languages like C, COBOL, PL/ orADA
There are two types of SQL: 1) Interactive SQL 2) EmbeddedSQL
Interactive SQL is used to operate directly on a database to produce output for ourpurpose.
Embedded SQL consists of SQL commands put inside programs that are mostly written in some
other high level language. This method can make the program more powerful andefficient.
Features of SQL
It’s an interactive query language that allows the users to use SQL statements to retrieve data and
display it o thescreen.
It’s a database programming language that allows programmer to embed SQL statements in 3GL
programs to access data in adatabase.
It’s a database administration language that defines the structure of the database and controls the
user access todata.
It’s a client/server language that allows application programs on PCs connected via LAN to
communicate with the database servers that store shareddata.
It’s a database gateway language and often used in gateway that allows one brand of DBMS to
communicate with another brand.
SQL*PLUS
SQL*PLUS is powerful ORACLE support that can take your instructions for oracle. This flexible tool
allows both developers and end-user to issue SQL commands directly against the
3. database.
Database developers use SQL*PLUS to create, fill and monitor an application’s database.
End- users of the database use it to perform ad hoc queries against thedatabase.
Basically SQL*PLUS is a command line interpreter. Commands issued in SQL*PLUS are
broken into two distinct groups: the ANSI standards SQL commands to create, monitor and
manipulate an application’s database; and the SQL*PLUS commands provided by ORACLE to
enhance the functionality of the ANSI standards SQLcommands.
SQL*PLUS commands control the SQL*PLUS environment, format the output of SQL
commands, and control database transaction processing.
SQL*PLUS provides an open port to the database. An open port gives users, depending upon
their access privileges to specific tables in a database unrestrained access to the database’s
data. When user issues a command, it directly affects the data in thedatabase.
Several levels of access security prevent SQL*PLUS and user from queuing and modifying
every table in the database. Each user runs SQL*PLUS with a specificuser
name with a specific level of database access. Furthermore, a security access is placed on
each database table, restricting user from quering and modifying other user’s table without
proper authorization.
Data Types
When you create table in SQL*PLUS, you must specify the type of data that may appear in
each column. Some of the common data types are listed below.
Data Type Command Description
Character
CHAR(size) Fixed length characterdata.
Size written in the bracket determines the length of data that can be
stored.
Default size is 1 and maximum size is255.
VARCHAR2
(size)
Variable length character string having maximum length size inbytes.
Maximum size is2000.
Size must bespecified.
Number
NUMBER(p,s) Used to store variable length numericdata.
P determines the total number of digits possible to the left of decimal
point.
S determines the total number of digits possible to the right of decimal
point.
NUMBER
(size)
Fixed point number with precision size and scale0.
Date DATE This data type is used to store data and timeinformation.
Default format isDD-MON-YY.
To enter the dates other than standard format, use the appropriate functions.
4. Long LONG Variable length character strings containing up to 2gigabytes.
Table cannot have more than one Long type of datafield.
It cannot beindexed.
It cannot be used with SQL function.
It cannot appear in WHERE, GROUP BY, ORGER BY,clauses.
Raw RAW(size) Raw binary data, size bytelong.
Maximum size is 255bytes.
CREATING A TABLE IN THE DATABASE
Sql>Create table tablename(column 1 datatype(size) [default <expr>]
[CONSTRAINT constraint name] [column_constraint],
Column 2 datatype(size)…..);
For example:
Sql>Create table client_master
( c_no varchar2(5), name varchar2(10), address varchar2(20), pincode number(6), bal_due number(10,2));
INSERTING DATA INTO THE TABLES
The INSERT command with the values clause is used to add new rows to a database table.
Sql>INSERT INTO tablename[(column1, column 2…)]
VALUES (value1, value2,..);
For example:
Sql>INSERT INTO client_master
(c_no, name, address, pincode, bal_due)
VALUES (‘C001’, ‘Ajay’, ‘A-5, Bhandu’, 384120, 500 );
DATA RETRIVAL USING SQL *PLUS
SQL*PLUS provides a query capability in the form of SELECT statement. One can view the current
information in the tables by using this statement.
The SELECT statement can be used to Display some or all the columns from a specified table.
Display some or all of the rows from a specified table.
Display calculated values from the table.
Display statistical information from the tables, like averages or sums of column values.
Combine information from two or more tables.
Displaying some or all the Columns from a Table
Sql>SELECT column1, column2,……
FROM tablename;
Sql>SELECT c_no, name
FROM client_master;
5. Sql>SELECT * FROM tablename;
Sql>SELECT * FROM client_master;
Note:
The SELECT clause followed by the FROM clause are required for any SQLquery.
Not all columns need to beselected.
Columns are displayed left or right in the orderspecified.
SELECT list items must be separated bycommas.
Rows are returned in an arbitrarymanner.
Users may query only tables they have created or tables to which they have grantedaccess.
If you want to see which tables you have in your account, a special query can be made… Sql>SELECT*
FROM tab;
Displaying Some Specified Rows from the Table
If you want conditional retrieval of rows i.e. only those rows which satisfy certain condition. You can use
WHERE clause in the SELECT statement.
sql>SELECT column list
FROM tablename
WHERE condition;
sql>SELECT c_no, name
FROM client_master
WHERE bal_due>500;
Note:
Columns specified n the WHERE clause must be part of the table specified in the formclause.
Columns used in the WHERE clause do not have to be in SELECTlist.
The WHERE clause must specify character data in the same case (upper or lower) that it is in
thedatabase.
The comparison operators that can be used in SQLstatements
< , > , <= .., >= , = ,<>
Elimination of duplicates from the select statement:
A table could hold duplicate rows. In such a case, to see only unique rows the syntax is:
Sql>SELECT DISTINCT columnname, columnname FROM tablename;
Sql>SELECT DISTINCT job FROM employee;
Sql>SELECT DISTINCT * FROM tablename;
Sql>SELECT DISTINCT * FROM client_master;
6. CRETING TABLE FROM A TABLE
Sql>CREATE TABLE tablename[(columnname, columnname)]
AS SELECT columnname, columnname
FROM tablename;
Sql>CREATE TABLE supplier_master (s_no, s_name, address, pincode, bal_due)
AS SELECT c_no, name, address, pincode, bal_due
FROM client_master;
The source table is a table identified in the select section of this SQL sentence. The target table is one
identified in the create section of this SQL sentence.
SORTING DATA IN A TABLE
SELECT * FROM TABLENAME ORDER BY <COLUMNNAME1>, <COLUMNNAME2> <{Sort order}>;
Sql> select * from supplier_master order by name;
Sql> select * from supplier_master order by name desc;
INSERTING DATA INTO A TABLE FROM ANOTHER TABLE
To insert data one row at a time into a table, it is quite possible to populate a table with data that already
exists in another table.
Sql>INSERT INTO tablename
SELECT columnname, columnname FROM tablename;
Sql>INSERT INTO supplier_master
SELECT c_no, name, address, pincode, bal_due FROM client_master;
Insertion of data set into a table from another table
Sql>INSERT INTO onetablename SELECT column1, column2,…
FROM other table
[WHERE Condition];
Sql>INSERT INTO supplier_master
SELECT c_no, name, address, pincode, bal_due
FROM client_master WHERE c_no=’C001’;
VIEWING THE STRUCTURE OF THE TABLE
Sometimes need may arise to see the column definition or the integrity constraints specified on them in a
particular table. In such conditions DESCRIBE function can be used to view table definition.
Sql>DESCRIBE tablename;
This displays list of columns and their respective column constraints for the specified table.
7. MODIFYING THE TABLE DEFINITION
To change the format of an exiting table, we can use ALTER TABLE command.
Sql>ALTER TABLE tablename [MODIFY] [ADD]
Adding New Column
Sql>ALTER TABLE tablename
ADD (new columnnamedatatype(size), new columnnamedatatype(size) );
Sql>ALTER TABLE client_master
ADD (c_faxnumber(15), city varchar2(6));
Modifying the Existing Columns:
Sql>ALTER TABLE tablename
MODIFY (columnnamenewdatatype(newsize));
Sql>ALTER TABLE client_master
MODIFY (c_faxvarchar2(10));
Note:
We can increase a CHAR column’s width or the number of the digits number of decimal places in the
NUMBER column at anytime.
We can change the column from NOT NULL TO NULL by adding the NULL clause to the end of
column specification.
To decrease a column size, the column must be NULL in all exiting rows.
To add the not NULL feature to a column, the column must have a value for every row in the table.
To change the data type of a column, all values in the column must be NULL in all rows.
To modify more than one column, use command within the parentheses to separate each column
from the next.
You may add a column at any time if NULL is specified. You may not be able to add a column
with NOT NULL specified.
You cannot change the table name and column name.
TRUNCATNG TABLES - Empties the table completely
TRUNCATE TABLE tablename;
Sql>TRUNCATE TABLE client_master;
DESTROYING TABLE / REMOVING THE TABLE FROM THE DATABASE
Sql>DROP TABLE tablename;
Sql>DROP TABLE client_master;
RENAMING TABLES
Sql>RENAME TABLE old table name TO new table name;
Sql>RENAME TABLE client_masterTO client_master1;
8. MODIFYING THE DATA IN EXISTING TABLE:
Sql>UPDATE tablename
SET column=expression or value
[WHERECondition];
Sql>UPDATE client_master
SET name= ‘Vijay, address=’Mehsana’
WHERE c_no=’c001’;
REMOVING ROWS FROM A TABLE:
The DELETE command is used to remove rows from a table. sql>DELETE FROM
tablename[WHERE condition];
sql>DELETE FROM client_master WHERE bal_due>500;
WHERE clause determines which rows will be removed. If the clause is not specified
All the rows from the table will be deleted.
A) Table Name:Client_master
Description: Used to store information about clients.
Column Name Data Type Size
Client_no Varchar2 6
Name Varchar2 20
Address1 Varchar2 30
Adddress2 Varchar2 30
Ciy Varchar2 15
Pincode Number 8
State Varchar2 15
Bal_due Number 10,2
B) Table Name: Product_master
Description: Used to store information about products.
Column Name Data Type Size
Product_no Varchar2 6
Description Varchar2 15
P_percent Number 4,2
U_measure Varchar2 10
Qty_on_hand Number 8
Reorder_lvl Number 8
9. Sell_price Number 8,2
Cost_price Number 8,2
C) Table Name:Salesman_master
Description: Used to store information about salesman working in the company.
Column Name Data Type Size
S_no Varchar2 6
S_name Varchar2 20
Address1 Varchar2 30
Address2 Varchar2 30
city Varchar2 20
Pincode Number 8
State Varchar2 20
Sal_amt Number 8,2
Tgt_to_get Number 6,2
Ytd_sales Number 6,2
remarks Varchar2 60
A) Table Name:Client_master
Client_no Name City Pincode State Bal_due
C001 Ivan Bombay 400054 Maharashtra 15000
C002 Vandana Madras 780001 Tamil Nadu 0
C003 Pramada Bombay 400057 Maharashtra 5000
C004 Basu Bombay 400056 Maharashtra 0
C005 Ravi Delhi 100001 2000
C006 Rukmani Bombay 400050 Maharashtra 0
B) Table Name: Product_master
Product_
No
Description P_
percent
U_
Measure
Qty_on_
hand
Reorder_
lvl
sell_
price
Cost_
price
P001 Floppies 5 Piece 100 20 525 500
P002 Monitor 6 Piece 10 3 12000 11280
P003 Mouse 5 Piece 20 5 1050 1000
P004 Floppies 5 Piece 100 20 525 500
P005 Keyboards 2 Piece 10 3 3150 3050
P006 Cd Drive 2.5 Piece 10 3 5250 5100
P007 1.44 Drive 4 Piece 10 3 8400 8000
C) Table Name:Salesman_master
S_no S_name City Pin State Sal_
Amt
Tgt_
to get
Ytd_
Sales
remarks
S001 Kiran Bombay 40000
2
Maharashtra 3000 100 50 Good
10. S002 Manish Bombay 40000
1
Maharashtr
a
3000 200 100 Good
S003 Ravi Bombay 40003
2
Maharashtr
a
3000 200 100 Good
S004 Ashish Bombay 40004
4
Maharashtr
a
3500 200 150 Good
Solve the following queries using the database given above.
A)Retrieving records from table.
1) Find out the names of allclients.
2) Retrieve the entire content of the client_mastertable.
3) Retrieve the list of names and the cities of all theclients
4) List the various products available from the product_mastertable.
5) List all the clients who are located inBombay.
6) Find the names of the salesman who have a salary equal to Rs.3000
B)Updating records in atable.
1) Change the city of client_no’C002’ to‘Bombay’.
2) Change the bal_due of client_no’C001’ toRs.1000
3) Change the cost price of Floppies to Rs.950.00
4) Change the city of the salesman to Mumbai.
C)Deleting records in atable:
1) Delete all salesman from the salesmane_master whose salaries are equal to Rs.3500.
2) Delete all products from product_master where the quantity on hand is equal to100.
3) Delete from client_master where the column state holds the value ‘TamilNadu’.
E)Altering the tablestructure:
• Add a column called ‘telephone’ of datatype ‘number’ and size=10 to the
client_mastertable.
• Change the size of sell_price column in product_master to10,2.
A)Deleting the table structure along withdata:
1) Destroy the table client_master along with itsdata.
A)Renaming thetable:
1) Change the name of the salesman_master table tosman_mast.