Explain the functions trim-length-count in oracle, Database Management System

Assignment Help:

Explain the following functions of Oracle with suitable examples:
(i) To_Char( ) (ii) Count( )
(iii) Trim( ) (iv) Length( )

Ans: (i) To_char( ): The TO_CHAR function converts a DATETIME, number, or NTEXT expression to a TEXT expression in a specified format. This function is typically used to format output data.

(ii) Count( ): The COUNT function returns the number of rows in a query.
The syntax for the COUNT function is:
SELECT COUNT (expression)
FROM tables
WHERE predicates;

(iii) Trim( ): In Oracle/PLSQL, the trim function removes all specified characters either from the beginning or the ending of a string.
The syntax for the trim function is:
trim( [ leading | trailing | both [ trim_character ] ] string1 )
leading - remove trim_string from the front of string1.
trailing - remove trim_string from the end of string1.
both - remove trim_string from the front and end of string1.

(iv) Length( ): In Oracle/PLSQL, the length function returns the length of the specified string.
The syntax for the length function is:
length(string1)
string1 is the string to return the length for. If string1 is NULL, then the function returns
NULL.


Related Discussions:- Explain the functions trim-length-count in oracle

Answer, Describe multi key files

Describe multi key files

Write short notes on index structure of files, WRITE SHORT NOTES ON INDEX S...

WRITE SHORT NOTES ON INDEX STRUCTURE OF FILES? There are two basic parts of indices 1.   Ordered indices 2.   Hash indices Every technique must be evaluated on the bas

Determine the subsystem design issue, Determine the Other System Design Iss...

Determine the Other System Design Issue How to realise subsystems; through hardware or software? How is object model mapped on chosen hardware software? Mapping

Database tables design and test queries, Load sample data into the database...

Load sample data into the database tables design and test queries to return the following information • All rows and columns for employees • All rows and columns for customers •

Write short notes on relational constraints, Write short notes on relationa...

Write short notes on relational constraints? Relational Constraints are: 1. NOT NULL 2. Unique 3. Primary key 4. Foreign key 5. Table check

Computer, 1. Will you advise that your organization uses open source softwa...

1. Will you advise that your organization uses open source software and why? 2. Why is it important for business managers to have a basic understanding of the software development

How can redundant associations be done, How can Redundant Associations be d...

How can Redundant Associations be done It can be done by asking questions: i)  Is there a specific arrangement of network which would optimize critical aspects of completed

Extended star schema, Why did SAP introduce the extended star schema? Expla...

Why did SAP introduce the extended star schema? Explain why it is reported to be better than the traditional schema model?

BI, (a) Why did SAP introduce the extended star schema?

(a) Why did SAP introduce the extended star schema?

Central database schema, Consider an information system designed for an onl...

Consider an information system designed for an online company which provides IT products and services. These include desktops, laptops, networking products, IT books, parts, and te

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd