Oracle 11g DATABASE DEVELOPMENT LAB1. Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations.

Slides:



Advertisements
Similar presentations
Virtual training week 4 structured query language (SQL)
Advertisements

1Eyad Alshareef Enhanced Guide to Oracle 10g Chapter 3: Using SQL Queries to Insert, Update, Delete, and View Data.
SQL Review Sections 1 - SQL and other basic statements.
Writing Basic SQL Statements. Objectives After completing this lesson, you should be able to do the following:  List the capabilities of SQL SELECT statements.
Writing Basic SQL SELECT Statements. Capabilities of SQL SELECT Statements A SELECT statement retrieves information from the database. Using a SELECT.
Introduction to Structured Query Language (SQL)
Introduction to Structured Query Language (SQL)
Introduction to Oracle9i: SQL1 Basic SQL SELECT Statements.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
Writing Basic SQL statement 2 July July July Create By Pantharee Sawasdimongkol.
Introduction to Structured Query Language (SQL)
A Guide to MySQL 3. 2 Objectives Start MySQL and learn how to use the MySQL Reference Manual Create a database Change (activate) a database Create tables.
Chapter 5 Data Manipulation and Transaction Control Oracle 10g: SQL
WRITING BASIC SQL SELECT STATEMENTS Lecture 7 1. Outlines  SQL SELECT statement  Capabilities of SELECT statements  Basic SELECT statement  Selecting.
Chapter 1 Writing Basic SQL Statements Important Legal Notice:  Materials on this lecture are from a book titled “Oracle Education” by Kochhar, Gravina,
Ceng 356-Lab1. Objectives After completing this lesson, you should be able to do the following: Get Familiar with the development environment List the.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
A Guide to SQL, Eighth Edition Chapter Three Creating Tables.
Chapter 2 Basic SQL SELECT Statements
Chapter 2 Basic SQL SELECT Statements Oracle 10g: SQL.
1 Copyright © 2006, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
Introduction to SEQUEL. What is SEQUEL? Acronym for Structural English Query Language Acronym for Structural English Query Language Standard language.
Much from Introduction to Oracle:SQL and PL/SQL, Oracle University 1 Basic SQL Statements Oracle/SQL Plus Commands Kroenke, 11 th ed., Chapter Two.
After completing this lesson, you should be able to do the following: List the capabilities of MySQL SELECT statements Execute a basic SELECT statement.
SQL (DDL & DML Commands)
Database control Introduction. The Database control is a tool that used by the database administrator to control the database. To enter to Database control.
2 Writing Basic SELECT Statements. 1-2 Copyright  Oracle Corporation, All rights reserved. Capabilities of SQL SELECT Statements Selection Projection.
Copyright  Oracle Corporation, All rights reserved. Writing Basic SQL Statements.
RELATSIOONILISED ANDMEBAASID(alg) SQLi VÕIMALUSED.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
A Guide to MySQL 3. 2 Introduction  Structured Query Language (SQL): Popular and widely used language for retrieving and manipulating database data Developed.
Database Systems Design, Implementation, and Management Coronel | Morris 11e ©2015 Cengage Learning. All Rights Reserved. May not be scanned, copied or.
Introduction to SQL PART Ⅰ 第一讲 Writing Basic SQL SELECT Statements.
Introduction to Oracle In June 1970,Dr E.F.Codd’s a published A paper entitled A relational model of Data for large shared data banks. This relational.
1 Writing Basic SQL Statements. 1-2 Objectives At the end of this lesson, you should be able to: List the capabilities of SQL SELECT statements Execute.
Copyright © 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement Satrio Agung Wicaksono, S.Kom., M.Kom.
Copyright © 2004, Oracle. All rights reserved. Lecture 4: 1-Retrieving Data Using the SQL SELECT Statement 2-Restricting and Sorting Data Lecture 4: 1-Retrieving.
ITEC 3220A Using and Designing Database Systems Instructor: Prof. Z. Yang Course Website: 3220a.htm
Working with Columns, Characters, and Rows. 2 home back first prev next last What Will I Learn? In this lesson, you will learn to: –Apply the concatenation.
1 Copyright © Oracle Corporation, All rights reserved. Writing Basic SQL SELECT Statements.
A Guide to SQL, Eighth Edition Chapter Six Updating Data.
Relational Database Management System(RDBMS) Structured Query Language(SQL)
1 Chapter 2 Basic SQL SELECT Statements. 2 Chapter Objectives Distinguish between an RDBMS and an ORDBMS Identify keywords, mandatory clauses, and optional.
1-1 Copyright  Oracle Corporation, All rights reserved. Logging In to SQL*Plus From Windows environment:From Windows environment: From command line:From.
SQL Introduction to database and SQL. Chapter 1: Databases and Database Users 6 Introduction to Databases Databases touch all aspects of our lives. Examples:
Simple Queries DBS301 – Week 1. Objectives Basic SELECT statement Computed columns Aliases Concatenation operator Use of DISTINCT to eliminate duplicates.
Writing Basic SQL Statements. Objectives After completing this lesson, you should be able to do the following: –List the capabilities of SQL SELECT statements.
LM 5 Introduction to SQL MISM 4135 Instructor: Dr. Lei Li.
 CONACT UC:  Magnific training   
1 Copyright © 2007, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
Oracle 10g Retrieving Data Using the SQL SELECT Statement.
1 Copyright © 2009, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
Oracle 11g: SQL Chapter 5 Data Manipulation and Transaction Control.
1 Copyright © 2005, Oracle. All rights reserved. Oracle Database Administration: Overview.
Copyright س Oracle Corporation, All rights reserved. 1 Writing Basic SQL Statements.
1 Copyright © 2004, Oracle. All rights reserved. Retrieving Data Using the SQL SELECT Statement.
RELATSIOONILISED ANDMEBAASID (algus , ORACLE materjalid)
Retrieving Data Using the SQL SELECT Statement
Writing Basic SQL SELECT Statements
Writing Basic SQL SELECT Statements
Introduction to Oracle9i: SQL
Writing Basic SQL SELECT Statements
Retrieving Data Using the SQL SELECT Statement
Chapter 2 Views.
Writing Basic SQL SELECT Statements
Contents Preface I Introduction Lesson Objectives I-2
Writing Basic SQL Statements
Retrieving Data Using the SQL SELECT Statement
Presentation transcript:

Oracle 11g DATABASE DEVELOPMENT LAB1

Introduction  Oracle 11g Database:-  Oracle 11g database is designed for some features, which helps to the organizations to manage everything easily and deliver high-quality services:-  DBA’s can increase their productivity, reduce costs, minimize errors and maximize the quality of services by using the management automation, fault diagnostics features, etc.  We can reduce the risk of down time and data loss by using the high availability features.  Here the performance of the database is so improved because of OLTP, secure files, etc and it helps to secure the information of organization with the data encryption and masking, and complex auditing capabilities, so it’s protected.

Introduction  Using SQL Command:-  SQL is a standard language for accessing databases. It is a computer language aimed  to store, manipulate, and query data stored in relational databases.  SQL provides statements for variety of tasks, including:  · Querying data  · Inserting, updating, and deleting rows in a table  · Creating, replacing, altering, and dropping objects  · Controlling access to the database and its objects

SQL Statements  Here are the SQL Statements, which we are used for querying with database, as-  1. Data Manipulation Language(DML)-  Retrieve data from database, enter new rows, Changes in existing rows, and  removes the rows which we no need to use from the tables in the database.  SELECT, INSERT, UPDATE, DELETE, MERGE.  2. Data Definition Language(DDL)-  Sets up, changes and removes data structures from tables.  CREATE, ALTER, DROP, RENAME, TRUNCATE, COMMENT.  3. Data Control Language(DCL)-  Provides or removes access rights to Oracle database and structures within  it.  GRANT, REVOKE.  4. Transaction Control-  Manages the changes made by DML statements.  COMMIT, ROLLBACK, SAVEPOINT.

LOGIN to SQLPLUS  After installing the Oracle 11g on Oracle Enterprise Linux5, login as the Oracle user.  sqlplus wants the user_name and password  before starts.  After inserting the correct user name and password the prompt will be  SQL>  Then sqlplus is ready for use

Chapter- 1  1. Creating Table: - For creating table, we have to give the table name and the  columns name and their data type and the size of the data which we can insert. Now  execute the following SQL command for creating the table.

Chapter- 1  2. Insert Data into Table: - When table will create, and then we have to insert data  into the table, which will be inserting in the following columns that are specified  before. So we can insert data by executing the following SQL command-

Chapter- 1  3. Using SELECT Statement for All Columns: -  SELECT identifies the columns to be displayed.  FROM identifies the table containing those Columns.

Chapter- 1  4. Selecting some Specific Columns: - We can use the SELECT statement to display  some specific columns only.

Chapter- 1  5. Ways of Writing SQL Statement: -  · SQL Statements are not case sensitive.  · SQL Statements can be entered on more than one line.  · Keywords cannot be Split or abbreviated.  · In SQL * Plus, we are required to end each SQL Statement with a Semicolon (;). But  in SQL Developer it’s optional, but when we execute multiple SQL Statements then  Semicolon is required.

Chapter- 1  7. Column Names in a Table: - Column name in SQL Developer is always display in  Left-aligned and in Upper case.  Column name in SQL * Plus also is always display in Left- aligned and in Upper case.

Chapter- 1  8. Using Arithmetic Expressions: -We may need to modify the data and also have to  perform some calculations. All these are possible using the arithmetic expressions.  An arithmetic expression contains the Column names, Arithmetic operators and  Constant numeric values. These are the arithmetic operators-  + (Add),  – (Subtract),  *(Multiply),  / (Divide)  w, we have a table and there is a salary column and we have to update this column.

Chapter- 1  Now, we will increase the salary of all employees by 500. So execute the following  command-

Chapter- 1  9. Operators Precedence: -If in an arithmetic expression, more than one operator is used then there is some precedence for using the operators.  So there are some rules of precedence of the arithmetic operators-  · Multiplication and Division operators occur before the Addition and Subtraction  operators.  · Operators of same priority are evaluated from left to right.  · Parentheses are used to override the default precedence.

Chapter- 1  10. Column Aliases: -By this, we can rename the column headings. There is used AS  keyword in between the column name and the alias.  There is used Double quotation mark (“”), if alias contains space or Special  Characters.

Chapter- 1  11. Concatenation Operator: -It links Columns or character strings to other columns.  It is represented by two vertical bars (||).

Chapter- 1  12. Literal Character String: -A literal is a character, a number, or a date that is  included in SELECT statement.  Character and Date literals must be enclosed within Single Quote marks (‘‘) whereas  Number literals need not be enclosed.  Like in above example, ‘from’ is as literal character string.

Chapter- 1  13. Displaying Structure of Table: -Use the DESC command to display the structure  of a table.