sql server - sqlserver scalar function returning result of select -
i want function find maximum allowable length of field. invoke in behind code, using cmd.executescalar(). however, can't function definition right.
this 1 of things tried:
create function getpwlen ( ) returns int begin return select max(len((password))) return_value tblsec end go
any appreciated.
no need column alias, wrap select in brackets
... return (select max(len(password)) tblsec) ...
Comments
Post a Comment