---
title: "学习ＳＱＬ\u3000"
author: "smartan"
date: "2011-10-31T22:27:03Z"
tags: []
categories: ["数据库"]
slug: "untitled"
draft: false
lastmod: "2011-10-31T22:33:33Z"
id: 1225401
url: "https://smartan.iteye.com/blog/1225401"
---

```
CREATE TABLE Orders
(
Id_O int NOT NULL,
OrderNo int NOT NULL,
Id_P int,
OrderDate date DEFAULT SYSDATE
);
```

 

```

```

```

```

```
 SQL> insert into Orders values (12,33,44,sysdate);　　　　　　　　　　已创建 1 行。

SQL> commit;

提交完成。

SQL> select * from Orders;

      ID_O    ORDERNO       ID_P ORDERDATE
---------- ---------- ---------- --------------
        12         33         44
        12         33         44 31-10月-11
```

 

```
用ＯＲＡＣＬＥ　插入系统　时间


在ｓｑｌ　ｓｅｖｅｒ　中　用　ｇｅｔＤａｔｅ（）

ｏｒａｃｌｅ　用　ｓｙｓｄａｔｅ
```