我找到了一些符合我要求的代码,但是在Oracle SQL
中。是否可以在SSMS
中执行相同的操作?看看代码:
CREATE OR REPLACE
TYPE obj_address_num AS OBJECT
( street varchar2(50),
numb number,
additionalInfo VARCHAR2(10),
MEMBER FUNCTION get_street RETURN varchar2,
MEMBER FUNCTION get_numb RETURN number,
MEMBER FUNCTION get_aditionalInfo RETURN varchar2
)
INSTANTIABLE NOT FINAL;
CREATE OR REPLACE
TYPE BODY obj_address_numb AS
MEMBER FUNCTION get_street RETURN varchar2 IS
BEGIN
RETURN SELF.street;
END;
MEMBER FUNCTION get_numb RETURN number IS
BEGIN
RETURN SELF.numb;
END;
MEMBER FUNCTION get_additionalInfo RETURN varchar2 IS
BEGIN
RETURN SELF.additionalInfo;
END;
END;
我想这可以通过某种.Net
语言来完成,但是可以只使用TSQL
来输入此代码吗?