How the EXPORT_SET() Function Works in MySQL

The MySQL EXPORT_SET() function returns a string that represents the bits in a number.

You have the ability to customise how the function outputs the string. The function accepts a number of arguments that allows you to do this. When you call the function, you provide the number in question, as well as arguments that determine how the results are displayed.

Continue reading

SIGN() Examples in SQL Server

In SQL Server, the T-SQL SIGN() function returns the sign of a number. In other words, it indicates whether or not the value is a positive number, a negative number, or zero.

You provide the number as an argument when calling the function.

The function returns the following result, depending on whether the argument is positive, negative, or zero.

  • 1 if the number is positive
  • -1 if the number is negative
  • 0 if the number is zero

Continue reading