Skip to content

Tag: mysql

Use replace with interval in sql query

I want to show if 0 it will put a word, perm for example and if not 0 it will get the normal date using interval. Tried to include it in replace. REPLACE(REPLACE(usetime,0,’PERM’), add_time + …

SQL many to many

I have fivetables here: User +——–+———-+ | stu_id | batch-id | +——–+———-+ | 1 | 1 | | 2 | 1 | | 3 | 1 | +——–+———-+ subject_id +-…