check function in sql code example
Example 1: how to search table name in stored procedure in sql server
SELECT Name
FROM sys.procedures
WHERE OBJECT_DEFINITION(OBJECT_ID) LIKE '%TableNameOrWhatever%'
Example 2: sql constraint check value in list
CREATE TABLE test(
_id BIGINT PRIMARY KEY NOT NULL,
decision NVARCHAR(5),
CHECK (decision in ('yes','no','maybe'))
);