Witam,
czy jest możliwe w SQL uzależnić jakoś pole od innego pola?
W sensie spróbuję to wytłumaczyć:
W MSSQL mam przykładową tabelę z polami:
ID int not null,
Description nvarchar(500) not null,
ShortDescription nvarchar(500),
IsOpen bit not null
Pole ShortDescription
jest nullable, a czy jest taka możliwość że jak pole IsOpen
jest ustawione na 0, to to pole ma zostać nullable, ale jak ktoś chce zmienić wartość pola IsOpen
na 1, to przed tą zmianą ShortDescription
musi zostać wypełnione?
Wiem że mogę to zaprogramować w procedurze lub w C# gdzie korzystam z tych danych, ale czy można coś takiego ustawić "na sucho"?