大数据 爬虫Python AI Sql

mySQL 学习 DAY1笔记

2020-02-19  本文已影响0人  Peng_001

https://www.jianguoyun.com/p/DeGsNV8QqKXmBxjJwugC

01 界面

schemas:tables, views, stored procedures, functions
在table中,可以看到不同类型的result grid
table 之间通过某种关系相互联系

02 mySQL 句法

USE sql_store; ##选定该数据库
SELECT * ##select all of data
FROM customers ##选择table中的具体列表
WHERE customers_id = 1 ##选中特定row
ORDER BY first_name ##以此为顺序排列

03 the select clause

对于数学运算遵循一般运算规律,并且可以用()对运算orders 进行改变

  1. 对数据的修改可以直接在grid result 里进行
    但需要进行apply 确认

  2. DISTINCT 操作
    SELECT DISTINCT state
    选中的select中出现的元素唯一即会过滤掉duplicates

04 the where clause

逻辑关系
">=, >, <=, <, =,
!= ##not equal
,
<>; ##not equal"

05 The AND, OR and NOT Operators

SELECT *
FROM customers
WHERE birth_date >= "1980-01-01" AND points > 1000 
## 两种标准共同达到的数据选择出来
ORDER BY birth_date
SELECT *
FROM customers
WHERE NOT birth_date >= "1980-01-01" AND points > 1000 
## 筛选生日在1980-01-01前且分数大于1000的人
ORDER BY birth_date
上一篇 下一篇

猜你喜欢

热点阅读