MySQL CURDATE() 函数
SQL 教程
· 2019-03-04 11:57:53
定义和用法
CURDATE() 返回当前的日期。
语法
CURDATE()
实例
下面是 SELECT 语句:
SELECT NOW(),CURDATE(),CURTIME()
结果如下所示:
| NOW() | CURDATE() | CURTIME() |
|---|---|---|
| 2008-11-11 12:45:34 | 2008-11-11 | 12:45:34 |
实例
下面的 SQL 创建带有日期时间列(OrderDate)的 "Orders" 表:
CREATE TABLE Orders
(
OrderId int NOT NULL,
ProductName varchar(50) NOT NULL,
OrderDate datetime NOT NULL DEFAULT CURDATE(),
PRIMARY KEY (OrderId)
)
请注意,OrderDate 列规定 CURDATE() 作为默认值。作为结果,当您向表中插入行时,当前日期和时间自动插入列中。
现在,我们想要在 "Orders" 表中插入一条记录:
INSERT INTO Orders (ProductName) VALUES ('Jarlsberg Cheese')
"Orders" 表将如下所示:
| OrderId | ProductName | OrderDate |
|---|---|---|
| 1 | Jarlsberg Cheese | 2008-11-11 |
点击查看所有 SQL 教程 文章: https://www.codercto.com/courses/l/29.html
Iterative Methods for Sparse Linear Systems, Second Edition
Yousef Saad / Society for Industrial and Applied Mathematics / 2003-04-30 / USD 102.00
Tremendous progress has been made in the scientific and engineering disciplines regarding the use of iterative methods for linear systems. The size and complexity of linear and nonlinear systems arisi......一起来看看 《Iterative Methods for Sparse Linear Systems, Second Edition》 这本书的介绍吧!