Change a field from NULL to NOT NULL in SQL Server

0

I am structuring a DB in SQL Server 2017 and I had a question about whether I could do the following in this case:

I have 4 Tables:

Maestro , DetalleMaestro , Seccion , SubSeccion .

The structure is this:

Maestro
    id
  , Nombre
  , Apellido

DetalleMaestro
    id
  , idMaestro
  , idSeccion
  , idSubSeccion <-- este ultimo campo es NOT NULL .

Seccion
    id
  , Seccion

SubSeccion 
    id
  , SubSeccion

The question is this:

  

There are two types of sections: one has more subsections - this one   we will call A- and the other one will not call us B -

If I have a teacher and this is assigned to section B that does not have subsections,

How can I make the 'SubSection' field NULL only for that specific teacher?

Is it possible to alter the type of the value of a field only for a record?

    
asked by Chris Fiallos 28.12.2018 в 05:17
source

0 answers