Mar 04 2024 12:24 AM
Hello,
I have got one question.
I want to use Dynamic data masking method for INT type column. I found that I can use the default() function.
for example:
/*MS Sql Server*/
CREATE TABLE [dbo].[Test](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Payment] [money] MASKED WITH (FUNCTION = 'default()') NOT NULL
)
Unfortunately I need you. Instead of the default() function, I want to insert a function written by me, where I will have a logic written to only hide payments where Payment > 1000.00.
If you understand my question correctly, please share your opinion or even give me a sample of the script. How can I use the function I wrote and also put the above mentioned logic.
thanks
Mar 04 2024 09:46 PM
@Beka_Tsaava , that's not possible to use a user defined function for masking. See column_definition (Transact-SQL) - SQL Server | Microsoft Learn, => MASKED, you can use only the 4 predefined functions.
Mar 17 2024 04:36 AM