摘要: class A(object): # 属性默认为类属性(可以给直接被类本身调用) num = "类属性" # 实例化方法(必须实例化类之后才能被调用) def func1(self): # self : 就是A这个大类 print("func1") print(self) # 类方法(不需要实例化类 阅读全文
posted @ 2020-06-03 19:36 Thelightone 阅读(286) 评论(0) 推荐(0) 编辑
摘要: 表中行的拼接: 用union 不去重就为 union all 表中列的拼接: 用内联接的话:inner join .. on..(联结条件) 内联结时必须使用ON子句,并且要书写在FROM和WHERE之间。 用外联接的话 (left/right)outer join .. on..(联结条件) 外联 阅读全文
posted @ 2019-12-31 09:34 Thelightone 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 完整日期:TO_DATE('2009-4-28 00:00:00', 'yyyy-mm-dd hh24:mi:ss'); to_date('2008/09/20','yyyy/mm/dd') 创建视图语句 CREATE VIEW ViewPractice5_1 AS(不可缺少) select语句 对 阅读全文
posted @ 2019-12-30 20:03 Thelightone 阅读(1251) 评论(0) 推荐(0) 编辑
摘要: mysql与oracle char为定长字符串 var为可变字符串 修改表名:rename table1 to table2;(mysql) alter table1 rename to table2(oracle) 新增列名:alter table product(表名)add column pr 阅读全文
posted @ 2019-12-28 08:56 Thelightone 阅读(153) 评论(0) 推荐(0) 编辑