mysql两者之间_sql between 语法与查询两者之间数据方法

BETWEEN 操作符

操作符 BETWEEN ... AND 会选取介于两个值之间的数据范围。这

些值可以是数值、文本或者日期。

SQL BETWEEN 语法

SELECT FROM WHERE (BETWEEN value1 AND value2

mysql教程>

mysql> CREATE TABLE Employee(

->     id            int,

->     first_name    VARCHAR(15),

->     last_name     VARCHAR(15),

->     start_date    DATE,

->     end_date      DATE,

->     salary        FLOAT(8,2),

->     city          VARCHAR(10),

->     description   VARCHAR(15)

-> );

Query OK, 0 rows affected (0.05 sec)

mysql>

mysql>

mysql> insert into Employee(id,first_name, last_name,

start_date, end_Date,   salary,  City,       Description)

->              values (1,'Jason',    'Martin',

'19960725',  '20060725', 1234.56, 'Toronto',

'Programmer');

Query OK, 1 row affected (0.00 sec)

mysql>

mysql> insert into Employee(id,first_name, last_name,

start_date, end_Date,   salary,  City,       Description)

->               values(2,'Alison',   'Mathews',

'19760321', '19860221', 6661.78, 'Vancouver','Tester');

Query OK, 1 row affected (0.00 sec)

mysql>

mysql> insert into Employee(id,first_name, last_name,

start_date, end_Date,   salary,  City,       Description)

->               v

你可能感兴趣的:(mysql两者之间)