摘要: 子查询 由一个具体的需求,引入子查询 谁的工资比Abel 的高 SELECT * from employees WHERE salary > ( SELECT salary FROM employees WHERE last_name = 'Abel' ) -- 自连接 SELECT e2.* FR 阅读全文
posted @ 2024-04-12 18:02 正霜霜儿 阅读(10) 评论(0) 推荐(0) 编辑
摘要: '''函数函 input() 的工作原理 的函数input() 让程序暂停运行,等待用户输入一些文本。获取用户输入后,Python将其存储在一个变量中,以方便你使用。'''# message = input("please tell me your name: ")# print("hello "+ 阅读全文
posted @ 2024-04-12 18:00 正霜霜儿 阅读(8) 评论(0) 推荐(0) 编辑
摘要: #九九乘法# for i in range(1, 10):# for j in range(1, i+1):# print('{}x{}={}\t'.format(j, i, i*j), end='')# print()row=1while row <= 9: col=1 while col <=r 阅读全文
posted @ 2024-04-12 17:55 正霜霜儿 阅读(2) 评论(0) 推荐(0) 编辑
摘要: # cars = ['audi', 'bmw', 'subaru', 'toyota']# for car in cars:# if car=='bmw':# print(car.upper())# else:# print(car.title())# 一个等号可解读为“将变量car 的值设置为'a 阅读全文
posted @ 2024-04-12 16:11 正霜霜儿 阅读(11) 评论(0) 推荐(0) 编辑
摘要: '''在Python中,字典字 是一系列键—值对值 。每个键 都与一个值相关联,你可以使用键来访问与之相关联的值。 与键相关联的值可以是数字、字符串、列表乃至字典。事实上,可将任何Python对象用作字典中的值。 在Python中,字典用放在花括号{}中的一系列键—值对表示 ''' customer 阅读全文
posted @ 2024-04-12 16:10 正霜霜儿 阅读(10) 评论(0) 推荐(0) 编辑