Good. When doing the update I get error .. Yes I already have a record in the table with those values, but when changing the type should not let me do?
Yes, I already have a record in the table with those values, but when changing the guy should not let me do it?
No, what you have to do is use a Where
, that is.
Update Falta_Licao
set Tipo = 1,
Descricao = ''
where Id_Turma = 1
and Id_Disciplina 1
and Licao = 1
and Id_Aluno = 3;
Virtually your table has both fields that you can change without any problem, even without specifying Where are the Type and the description, but if you try to make an update by changing the primary keys of your table may already be have a record with the keys you are reporting,.
See that the primary key of your table is composed of 4 fields, if the combination of these fields already exists you will get this error.
If you need to update in these fields the ideal is to have a unique key to table, that is, to create a Id_Falta_Licao as the primary key, so you could change any field without problem.