What is the usage of the DISTINCT keyword?

The DISTINCT keyword is used to ensure that the fetched value is only a non-duplicate value. The DISTINCT keyword is used to SELECT DISTINCT, and it always fetches different (distinct) from the column of the table. The DISTINCT keyword in SQL is used to eliminate duplicate records from the result set of a SELECT query. … Read more

What are the syntax and use of the COALESCE function?

The syntax of COALESCE function: COALESCE(exp1, exp2, …. expn) The COALESCE function is used to return the first non-null expression given in the parameter list. The COALESCE function in SQL is used to return the first non-null expression among its arguments. It takes multiple arguments and returns the first non-null expression from the list. Here … Read more

Which function is used to return remainder in a division operator in SQL?

The MOD function returns the remainder in a division operation. In SQL, the function used to return the remainder in a division operation is the MOD function. The MOD function calculates the remainder of one number divided by another. Here’s an example: SELECT MOD(10, 3) AS Remainder; In this example, the result would be 1 … Read more

What is the usage of NVL() function?

The NVL() function is used to convert NULL value to the other value. NVL() function is used in Oracle it is not in SQL and MySQL server. Instead of NVL() function MySQL have IFNULL() and SQL Server have ISNULL() function. In SQL, the NVL() function is typically used to replace NULL values with a specified … Read more

Which are the different character-manipulation functions in SQL?

CONCAT: join two or more values together. SUBSTR: used to extract the string of specific length. LENGTH: return the length of the string in numerical value. INSTR: find the exact numeric position of a specified character. LPAD: padding of the left-side character value for right-justified value. RPAD: padding of right-side character value for left-justified value. … Read more