skip to Main Content

I am in the process of creating stored procedures, and I’ve noticed that in the existing ones, parameters are declared using the ‘identifier’ type, which seems to be an outdated practice. I am updating them to use INTEGER type parameters. I would like to clarify whether it is considered best practice to use INT or INTEGER as the data type for stored procedure parameters?Screenshot of Parameters Declared in INT

I am currently updating existing stored procedures where parameters were initially declared using the ‘identifier’ type. I believe this practice is outdated, and I am inclined to update them to use integer-type parameters.

However, I am seeking clarification on whether it is considered best practice to use INT or INTEGER as the data type for stored procedure parameters. I want to ensure compatibility and adherence to modern coding conventions.

Questions:

Is it recommended to replace ‘identifier’ with INT or INTEGER for stored procedure parameters?

Are there any specific advantages or considerations for using one data type over the other in this context?

Are there potential compatibility issues with certain database systems when choosing one over the other?

I appreciate any insights or recommendations regarding this matter. Thank you!

2

Answers


  1. It does not matter if you use INT or INTEGER. The only principle you should use is that you need to be consistent with whatever you use. For example you use INT then you should use only INT for any SQl commands whether you are creating a table, function, view, stored procedures, etc. There are no advantages when you choose INT over INTEGER and vice versa.

    Login or Signup to reply.
  2. INT is basic datatype. So if there is no need to use any methods or properties for your value then no need of going for INTEGER. Just go for INT type.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search