SQL Tabloya eklemeyi dene eklense de eklenmese de ID’sini al.
WITH s AS ( SELECT id FROM beta.kitaplar WHERE kitap = 'asdasd' ), i AS ( INSERT INTO beta.kitaplar ("kitap") SELECT 'asdasd' WHERE NOT exists (SELECT 1 FROM s) RETURNING…
WITH s AS ( SELECT id FROM beta.kitaplar WHERE kitap = 'asdasd' ), i AS ( INSERT INTO beta.kitaplar ("kitap") SELECT 'asdasd' WHERE NOT exists (SELECT 1 FROM s) RETURNING…
https://www.postgresql.org/docs/current/datatype.html Tablo yaratma SQL’leri buraya gelecek. pip install psycopg2-binary