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

Relational algebra and calculus, Q.  What is relational algebra and calcul...

Q.  What is relational algebra and calculus? Explain the relational algebra operators :- Selection and predicate, set operation, joins and division. Sol. Relational Algebra

A database administrator'', A database administrator''s responsibilities an...

A database administrator''s responsibilities and data contents

Database for online assignment system, i want to database for online assign...

i want to database for online assignment submission system

What is a data dictionary, What is a data dictionary?  A data dictionar...

What is a data dictionary?  A data dictionary is a data structure which keeps Meta data about the structure of the database i.e.  the schema of the database.

Group by clauses-data manipulation language, Group By clauses  • It is ...

Group By clauses  • It is used to group database tuples on the basis of definite common attribute value like as employees of a department. WHERE clause still can be used

Data base design, how to design a bakery business in data base

how to design a bakery business in data base

Distributed transaction atomic-consistent-isolated, A distributed transacti...

A distributed transaction consists of subtransactions that execute at different sites and access local DBMSs at those sites. For example, a distributed transaction that transfers m

Illustrate package classes and associations into models, Package classes an...

Package classes and associations into models  Programs are made of separate physical units which could be edited, imported, complied or otherwise manipulated. The careful part

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