SIGN() Function in MySQL Last Updated : 23 Jul, 2025 Comments Improve Suggest changes Like Article Like Report SIGN() function in MySQL is used to return the sign of the given number. It returns 1 if the number is positive, -1 if the number is negative and 0 for zero. Syntax : SIGN(X) Parameter : SIGN() function accepts one parameter as input and will give you the results in values like Positive(+1),Negative(-1) and Zero(0). X -A number whose sign we want to check. Returns - It returns the value of sign of the given number i.e. Positive(+1), Negative(-1) and Zero(0). Example-1 : Applying SIGN() function to Zero. SELECT SIGN(0) AS Sign_Val; Output : Sign_Val 0 Example-2 : Applying SIGN() function to a positive number. SELECT SIGN(12) AS Sign_Val; Output : Sign_Val 1 Example-3 : Applying SIGN() function to a negative number. SELECT SIGN(-2) AS Sign_Val; Sign_Val-1 Example-4 : Applying SIGN() function to a numeric column in a table. Table -Number X+121.80-1.8-14 SELECT X, SIGN(X) AS X_Sign FROM Number; Output : XX_Sign 1211.8100-1.8-1-14-1 Create Quiz Comment J jana_sayantan Follow 0 Improve J jana_sayantan Follow 0 Improve Article Tags : SQL DBMS-SQL mysql Explore BasicsWhat is SQL?6 min readSQL Data Types3 min readSQL Operators4 min readSQL Commands | DDL, DQL, DML, DCL and TCL Commands4 min readSQL Database Operations3 min readSQL CREATE TABLE3 min readQueries & OperationsSQL SELECT Query3 min readSQL INSERT INTO Statement4 min readSQL UPDATE Statement3 min readSQL DELETE Statement3 min readSQL - WHERE Clause2 min readAliases in SQL2 min readSQL Joins & FunctionsSQL Joins (Inner, Left, Right and Full Join)4 min readSQL CROSS JOIN1 min readSQL | Date Functions3 min readSQL | String functions6 min readData Constraints & Aggregate FunctionsSQL NOT NULL Constraint2 min readSQL PRIMARY KEY Constraint5 min readSQL Count() Function4 min readSQL SUM() Function2 min readSQL MAX() Function3 min readAVG() Function in SQL2 min readAdvanced SQL TopicsSQL Subquery5 min readWindow Functions in SQL6 min readSQL Stored Procedures7 min readSQL Triggers5 min readSQL Performance Tuning6 min readSQL TRANSACTIONS6 min readDatabase Design & SecurityIntroduction of ER Model9 min readIntroduction to Database Normalization6 min readSQL Injection11 min readSQL Data Encryption5 min readSQL Backup4 min readWhat is Object-Relational Mapping (ORM) in DBMS?7 min read Like