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

Oracle SQL Developer, Introductory course and so does not require any fancy...

Introductory course and so does not require any fancy coding. I will provide a guidance document to help you in producing the solutions.

Create the logical database schema, 1.  Based on the dependency diagram, cr...

1.  Based on the dependency diagram, create a database whose tables are in at least 2NF, showing the dependency diagram for each table (as shown in class).  Label the types of depe

Modelling and normalisation, Task Part A. Create an ERD from a business pro...

Task Part A. Create an ERD from a business problem. (50 marks) Read the following problem and complete the tasks listed below. THE ABS Blood Bank Australian Blood Services (ABS) i

What is de-normalization, What is De-normalization? De-normalization is...

What is De-normalization? De-normalization is the method of attempting to optimize the performance of a database by adding redundant data. It is sometimes essential because cur

What is an e-r model and draw an e-r diagram for the company, What is an E-...

What is an E-R model? Draw an E-R Diagram for the company database with following Descriptions? The company is organized within departments. Each department has a unique name a

What is the difference between link and reference, What is the difference b...

What is the difference between link and reference? The fundamental difference between links and references is that links are symmetrical on the other hand references refer only

What are costs to be considere when transaction is roll back, What are the ...

What are the costs to be considered when a transaction has to be rolled back when recovering from deadlock?         Ans: A few transaction will must rolled back (made a victim)

Determine the three views of data, Determine the Three Views of Data We...

Determine the Three Views of Data We know that the similar thing, if viewed from dissimilar angles produces difference sights. Similarly, the database that we have formed alrea

Explain trigger, Explain trigger? Trigger: A database trigger is proc...

Explain trigger? Trigger: A database trigger is procedural code which is automatically executed within response to certain events on a particular table in a database. Trigger

DBMS, what is specialization?

what is specialization?

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