php - Instruction conditional if to checked double records -


this question has answer here:

i have table: enter image description here

how can write instruction if, check records stored @ same time (in table column created_at). example:

if(created_at record key(it's column)='stan' same created_at key='stan_key' {     return records key='stan' } 

several options this. here's version using exists:

select *  yourtable y1 y1.key = 'stan' , exists (     select 1     yourtable y2     y2.key = 'stan_key' , y1.created_at = y2.created_at) 

Comments

Popular posts from this blog

jOOQ update returning clause with Oracle -

java - Warning equals/hashCode on @Data annotation lombok with inheritance -

java - BasicPathUsageException: Cannot join to attribute of basic type -