当前位置:首页 > 数据库 > 正文

数据库符号怎么打

数据库符号打法:




1. 关系运算符


>= (大于或等于)

<= (小于或等于)

= (等于)

> (大于)

< (小于)

!= (不等于)


2. 逻辑运算符


AND (与)

OR (或)

NOT (非)


3. 集合运算符


UNION (并集)

INTERSECT (交集)

EXCEPT (差集)


4. 聚合函数


SUM (求和)

COUNT (计数)

AVG (平均值)

MIN (最小值)

MAX (最大值)


举例:


1. SELECT FROM customers WHERE age >= 18;


2. SELECT FROM orders WHERE status = 'shipped' AND total > 100;


3. SELECT customer_id, COUNT() AS order_count FROM orders GROUP BY customer_id;


4. SELECT SUM(sales) FROM products WHERE category = 'electronics';