要使用SQL筛选语句,您可以使用SELECT语句结合WHERE子句来实现。以下是一些常见的筛选语句示例:
SELECT * FROM 表名 WHERE 条件;
示例:
SELECT * FROM Customers WHERE Country = 'USA';
SELECT * FROM 表名 WHERE 条件1 AND 条件2;
SELECT * FROM 表名 WHERE 条件1 OR 条件2;
SELECT * FROM 表名 WHERE NOT 条件;
示例:
SELECT * FROM Customers WHERE Country = 'USA' AND City = 'New York';
SELECT * FROM Customers WHERE Country = 'USA' OR Country = 'Canada';
SELECT * FROM Customers WHERE NOT Country = 'USA';
SELECT * FROM 表名 WHERE 列名 = 值;
SELECT * FROM 表名 WHERE 列名 <> 值;
SELECT * FROM 表名 WHERE 列名 > 值;
SELECT * FROM 表名 WHERE 列名 >= 值;
SELECT * FROM 表名 WHERE 列名 < 值;
SELECT * FROM 表名 WHERE 列名 <= 值;
示例:
SELECT * FROM Customers WHERE Country = 'USA';
SELECT * FROM Customers WHERE Age <> 30;
SELECT * FROM Customers WHERE Age > 18;
SELECT * FROM Customers WHERE Age >= 18;
SELECT * FROM Customers WHERE Age < 30;
SELECT * FROM Customers WHERE Age <= 30;
这些是基本的筛选语句示例。请根据您的具体需求使用适当的语法和运算符。