What is a characteristic of the use of binding variables in JavaScript stored procedures in Snowflake?
What is a characteristic of the use of binding variables in JavaScript stored procedures in Snowflake?
In Snowflake, when using binding variables in JavaScript stored procedures, only JavaScript variables of type number, string, and SfDate can be bound. This is a limitation on the types of JavaScript variables that can be used for binding, ensuring that the data types are appropriate for use in SQL statements.
https://docs.snowflake.com/en/developer-guide/stored-procedure/stored-procedures-javascript
The data type of the variable should be appropriate for the use of the value in the SQL statement. Currently, only JavaScript variables of type number, string, and SfDate can be bound.
C. Only JavaScript variables of type number, string, and SfDate can be bound. In Snowflake, when using binding variables in JavaScript stored procedures, only JavaScript variables of certain types can be bound. These types are typically limited to number, string, and SfDate. Options A and B are incorrect because not all types of JavaScript variables or all Snowflake first-class objects can be bound. There are restrictions on the types of variables that can be used as binding variables. Option D is incorrect because users are not restricted from binding JavaScript variables due to SQL injection concerns. The use of binding variables is a good practice to prevent SQL injection vulnerabilities as it helps separate SQL logic from user input, making it more secure.