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

Explain the function of object model, Explain the function of Object model ...

Explain the function of Object model Object model describes the classes of objects in system, including their attributes and operations which they support. The analysis object

Two phase locking (2pl), Two Phase Locking (2PL) The two-phase locking ...

Two Phase Locking (2PL) The two-phase locking protocol having of two phases: Phase 1 : The lock acquisition phase : If a transaction T needs to read an object, it wants to

Enforce referential integrity, Use Access 2007 to create a database calle...

Use Access 2007 to create a database called UniLib.mdb. - this file should be created on your personal drive at the university (or C: if you're using Access 2007 at home) and t

DSS, WHAT IS DSS? WRITE ITS REQUIREMENTS.

WHAT IS DSS? WRITE ITS REQUIREMENTS.

Command line interfaces, Command Line Interfaces: These are interactive int...

Command Line Interfaces: These are interactive interfaces, character-based that let you use the complete power and functionality of the DBMS query language directly. They permit yo

Log based recovery, Log based recovery: Let us first describe the term tran...

Log based recovery: Let us first describe the term transaction log in the context of DBMS. A transaction log is a record in DBMS that remains track of all the transactions of a dat

Convert the er - diagram into a relational database, Convert the following ...

Convert the following ER - diagram (Entity Relationship Diagram) into a relational database (the primary keys are underlined):       Ans:  The relational database schema f

Which method of access uses key transformation, Which method of access uses...

Which method of access uses key transformation? A Hash method of access uses key transformation.

Explain entity integrity and referential integrity rules, Explain entity in...

Explain entity integrity and referential integrity rules within relational model. Show how these are realized in SQL? Entity Integrity Rule - No primary key value could be nu

Explain hashing techniques, Explain Hashing techniques The hashing tech...

Explain Hashing techniques The hashing techniques can be categorized as: Static Hashing Techniques - In this method, the data can be viewed a collection of buckets, along with

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