Sie sind auf Seite 1von 15

DEPARTMENT OF TECHNICAL

EDUCATION ANDHRA PRADESH


Name : M.Bhagya Lakshmi,
Designation : Lecturer in CCP,
Institution : GMR Polytechnic, Gajwel
Branch : DCCP
Semester : V Semester
Major Topic : SQL Plus
Sub –Topic : SQL EDITOR
Subject name : RDBMS
Subject Code : CCP- 505
Duration : 50 min.
Teaching Aids : PPT
CCP505.46 1
Objectives:

On the completion of this period you would


be able to understand
 The commands associated with SQL reports

CCP505.46 2
Recap

We have learned about


 SQL Reports

CCP505.46 3
Creation of Report in SQL*PLUS

 SQL*PLUS provides us with the several


commands for formatting query results

CCP505.46 4
Creation of Report in SQL*PLUS
(contd..)
 Column commands
 Compute commands
 Title commands
 Setting page dimensions
 Storage and printing commands

CCP505.46 5
Column commands

 Broadly classified into customizing column name


and contents

CCP505.46 6
Customizing column name

 SQL*PLUS uses column names as defaults


column headings while displaying query results

CCP505.46 7
Customizing column name
(contd..)

 Display our own column heading with the help of


the following command
SQL>Column <col_name> heading
<col_heading;
 EX: SQL>column ename heading emp_name;

CCP505.46 8
Customizing column contents

 SQL*PLUS display format or we can change it the


following command
SQL>Column <col_name> format model

CCP505.46 9
Example 1

 The example which display salary in the following


format
 SQL>column sal format $999,99;
 SQL>Select sal from emp;

CCP505.46 10
Example 2

 To set the width of the column name to four


characters
 SQL>Column name format a4;
 SQL>select ename from emp;

CCP505.46 11
Note

 To list the current display attributes for a given


column
 Column <column_name>

CCP505.46 12
Summary

We have discussed about


 The query results can be produced a finished
report using SQL*PLUS commands
 We can display our own column heading

CCP505.46 13
Quiz
1. Column formatting command is used to format
a) Cell
b) Column
c) Row
d) All

CCP505.46 14
Frequently Asked Questions

3. Explain any four formatting commands used in


SQL PLUS

CCP505.46 15

Das könnte Ihnen auch gefallen