Search
 
SCRIPT & CODE EXAMPLE
 

SQL

mysql max number not returning correct value

//This happen due to your comlum donot have interger data type so to relove this
issue there are two ways the first one is change the DATA TYPE to interger

or

another method is to 

SELECT values  FROM  `students` where   id='96' order by cast(values as SIGNED) desc limit 1;

the  cast(values as SIGNED)  will convert the str value into integer value then it will works fine
======CAst example======

https://www.tutorialspoint.com/how-to-get-the-maximum-value-from-strings-with-integers-in-mysql
Comment

PREVIOUS NEXT
Code Example
Sql :: how to view full conversation with chat.db 
Sql :: ring MySQL Save Image inside the database 
Sql :: To access SQL database file 
Sql :: create trigger in phpmyadmin 
Sql :: oracle query to see what scema i am working in 
Sql :: strat with in sql 
Sql :: geopoint from json mysql function 
Sql :: VERIFY INDEXES WITH PARTITIONS IN SQL ORACLE 
Sql :: The fetch keyword oracle 
Sql :: copy table structure from postgresql to mysql 
Sql :: count in spqarql 
Sql :: mysqldump error --no-beep 
Sql :: migration graphql 
Sql :: dbt unique key 
Sql :: primary key in sql 
Sql :: sql compiler 
Sql :: sql server interview questions 
Sql :: SQL Error When Inserting Duplicate Values 
Sql :: remove accented characters in bigquery 
Sql :: tsql utf to local time 
Sql :: sql stored procedure for access frontend 
Csharp :: unity get number of child objects 
Csharp :: unity check collider layer 
Csharp :: Changing datagridview cell color dynamically 
Csharp :: textmeshpro text 
Csharp :: fade text unity 
Csharp :: unity check for internet connection 
Csharp :: unity application quit 
Csharp :: c# loop through datatable 
Csharp :: read file c# 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =