We all know the function of a system function DATEADD(as an example). This function has 3 parameters, which are so strange to me. I searched Google for so long to find out the type of parameter of the first parameter (which is shown varcharin the object browser window), but did not find anything!
I think this is kind of Enum used in this function, because using it is very similar to using Enum:
Print DATEADD(DAY,1,GETDATE()) -- What that DAY?
My question can be answered if the answer to one of these questions:
- How can I determine the definition of system functions?
- What is this
DAYin the instructions above and how can I write a function such as DATEADDto accept such a parameter? - If this is an enumeration, how can I define an enumeration in TSQL?
source
share