ABS CEIL FLOOR functions in SQL || Lesson 60 || DBMS || Learning Monkey ||
ABS CEIL FLOOR functions in SQL In this class, we will understand ABS CEIL FLOOR Functions in SQL. We have already discussed LENGTH SUBSTR and INSTR functions in SQL. ABS CEIL FLOOR Functions in SQL Number Functions in SQL The ABS CEIL FLOOR functions in SQL are number functions. The number functions are divided into two. Single value functions Aggregate value functions Single Value Functions The functions applied on only one value are called single-value functions. There is a wide variety of single-value functions in SQL. In this class, we will cover ABS CEIL FLOOR functions. Aggregate Value Functions The functions applied on the list of values are called aggregate-value functions. Ex: sum, average, etc. ABS: Absolute Value is the measure of the magnitude of some value. To understand these functions consider the table shown below. The ABS will produce the magnitude of a number, not the sign of the number. The query with ABS and the output of the ‘query’ are as shown below. SELECT ABS(value) FROM numbers; Ceil: Ceil produces the smallest whole number that is greater than or equal to the specified value. For example, consider the 1.3, 1.3 is between 1 and 2. The numbers whose value is more than 1.3 are 2, 3, 4, 5, and so on. The smallest among those is 2. The CEIL will produce 2. The query with CEIL and the output of the ‘query’ is as shown below. SELECT CEIL(value) FROM numbers; Floor: Floor produces the ‘largest’ whole number less than or equal to the specified value. For example, consider the 1.3, 1.3 is between 1 and 2. The numbers whose value is less than 1.3 are 1, 0, -1, -2, and so on. The largest among those is 1. The FLOOR will produce 1. The query with FLOOR and the output of the ‘query’ is as shown below. SELECT FLOOR(value) FROM numbers; #learningmonkey #dbms #placements #gatecse #gatedbms #campusplacements Link for playlists: https://www.youtube.com/channel/UCl8x4Pn9Mnh_C1fue-Yndig/playlists Link for our website: https://learningmonkey.in Follow us on Facebook @ https://www.facebook.com/learningmonkey Follow us on Instagram @ https://www.instagram.com/learningmonkey1/ Follow us on Twitter @ https://twitter.com/_learningmonkey Mail us @ [email protected]
Download
0 formatsNo download links available.