SQL LIKE question
        Posted  
        
            by user176121
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by user176121
        
        
        
        Published on 2010-05-23T12:12:50Z
        Indexed on 
            2010/05/23
            12:20 UTC
        
        
        Read the original article
        Hit count: 260
        
I was wondering if there's a drawback (other than bad practice) to using something like this
SELECT * FROM my_table WHERE id LIKE '1';
where id is an integer. I know you're supposed to use id=1 but I am writing a java program and if everything can use LIKE it'll be a lot easier for me. Also, so far, everything works fine; I get the correct query results, so if there is no drawback I will continue doing it like this.
edit: I am using MySQL.
© Stack Overflow or respective owner