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

Define null value, Define NULL value NULL value NULL means something is...

Define NULL value NULL value NULL means something is unknown. It does NOT mean null (the digit 0). Null is as well employed as attribute value for a particular entity in which

What is magnetic disks, What is magnetic disks?explain it? Magnetic dis...

What is magnetic disks?explain it? Magnetic disk provides the bulk of secondary storage of modern computer system. The disk capacity is growing at over 50% per year. But the st

Explain domain calculus, Explain Domain calculus Domain calculus is one...

Explain Domain calculus Domain calculus is one of the types of the relational calculus. The formal specification of the domain calculus was planned after the development of the

What is thread splitting, What is Thread splitting A thread of cont...

What is Thread splitting A thread of control is a path by which a set of state diagrams on that a single object is active at a time. Objects are shared between threads

What are segments in oracle, What are segments in oracle? Segments - Ea...

What are segments in oracle? Segments - Each table has single field of disk space, known as segment, set aside for it in the tablespace. Segments consist of contiguous sections

Hashing, how to implement mid square hashing?

how to implement mid square hashing?

Question, I want to buy this but I want to see a couple sample questions fi...

I want to buy this but I want to see a couple sample questions first. http://www.expertsmind.com/library/what-happens-to-rms-error-for-the-training-data-set-51564843.aspx

Improve efficiency of database, Smart Alex Catering Sevice (SACS) is a comp...

Smart Alex Catering Sevice (SACS) is a company offering top class catering staff  for prestigious events.  The company employs approximately 200 hourly paid contact staff - chefs,

ERD, A student entity type has the following attributes,name..

A student entity type has the following attributes,name..

Function module and a normal abap/4 subroutine, What is the difference betw...

What is the difference between the function module and a normal ABAP/4 subroutine? In contrast to normal subroutines function modules have uniquely exact interface.  Declaring da

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