pears.TableExists

Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.

CREATE FUNCTION "pears"."TableExists"( 
  /* Application Maintained Function / Procedure - DO NOT EDIT*/
  IN @Creator CHAR(128),IN @TableName CHAR(128) ) 
RETURNS SMALLINT
deterministic
BEGIN
  /* If @Creator is null (NOT empty string) = all creators
Works for tables, views, global temporary but not local temporary */
  IF EXISTS(SELECT * FROM "sys"."SysColumns" WHERE "Creator" LIKE "isnull"(@Creator,'%') AND @TableName = "TName") THEN
    RETURN 1
  ELSE RETURN 0
  END IF
END
  • database/functions/pears_tableexists.txt
  • Last modified: 2026/08/07 19:24
  • by 127.0.0.1