Firebird constant value -


Is it possible to have a database comprehensive constraint? What I want to define is like a continuous:

  • UPDATE_CONSTANT = 1
  • INSERT_CONSTANT = 2
  • DELETE_CONSTANT = 3

And then use a trigger like it in the example:

  create triggering PRJ_PROJECT for AD_PRJ_PROJECTS active Delete the 1st position 1 because the process SP_ADD_HISTORY starts executing 'PRJ_PROJECT', DELETE_CONSTANT; End; You can use a generator:  
 

after

3 from SET GENERATOR DELETE_CONSTANT; ... Execution process SP_ADD_HISTORY 'PRJ_PROJECT', GEN_ID (DELETE_CONSTANT, 0);

Update : Yes, the use of a generator for this purpose is dangerous, as they can be changed. However, this risk can be terminated in FireBird 3.0 alpha 1 using Access rights:.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -