正在加载图片...
Methods Can add a method declaration with a structured type. method ageOnDate(onDate date) returns interval year Method body is given separately. create instance method ageOnDate(onDate date) returns interval year for CustomerType begin return onDate-self.dateOfBirth; end We can now find the age of each customer: select name.lastname,ageOnDate(current_date) from customer Database System Concepts-7th Edition 29.10 ©Silberscha乜,Korth and SudarshanDatabase System Concepts - 7 29.10 ©Silberschatz, Korth and Sudarshan th Edition Methods ▪ Can add a method declaration with a structured type. method ageOnDate (onDate date) returns interval year ▪ Method body is given separately. create instance method ageOnDate (onDate date) returns interval year for CustomerType begin return onDate - self.dateOfBirth; end ▪ We can now find the age of each customer: select name.lastname, ageOnDate (current_date) from customer
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有