I think the problem in your request is what it tahun_bukuhas datatype int, and you are trying to select empty string( '').
You have workarounds:
Change tahun_bukuto varchar(2010,2012 .. will be considered as strings that I don’t know if this is normal)
Set:
select case when t1.tahun_buku=t2.tahun_buku then null else t1.tahun_buku end tahun_buku,t1.judul_buku
from tbl_buku t1 left join tbl_buku t2
on t1.id_buku-1=t2.id_buku;
source
share