Oracle 11g创建一张表表名test_dt
时间: 2023-12-21 10:20:31 浏览: 35
以下是 Oracle 11g 创建一张表名为 test_dt 的示例:
```
CREATE TABLE test_dt (
id INT PRIMARY KEY,
name VARCHAR(50),
created_date DATE,
updated_date DATE
);
```
这个示例创建了一张名为 "test_dt" 的表,其中包含一个 id 字段、一个 name 字段、一个 created_date 字段和一个 updated_date 字段。其中,id 字段被设置为主键。created_date 字段和 updated_date 字段都是日期类型,分别表示该记录的创建日期和更新日期。这样,我们可以在这张表中存储一些与日期相关的数据。
相关问题
创建了一张名为 "test_dt" 的表,其中包含一个 id 字段、一个 name 字段
以下是 Oracle 11g 创建一张名为 "test_dt" 的表,其中包含一个 id 字段和一个 name 字段的示例:
```
CREATE TABLE test_dt (
id INT PRIMARY KEY,
name VARCHAR(50)
);
```
这个示例创建了一张名为 "test_dt" 的表,其中包含一个 id 字段和一个 name 字段。其中,id 字段被设置为主键。这样,我们可以在这张表中存储一些基本的信息,如用户的 id 和姓名等。
Oracle 11g创建一张表表id和name
以下是 Oracle 11g 创建一张表表 id 和 name 的示例:
```
CREATE TABLE id_and_name (
id INT PRIMARY KEY,
first_name VARCHAR(50),
last_name VARCHAR(50)
);
```
这个示例创建了一张名为 "id_and_name" 的表,其中包含一个 id 字段、一个 first_name 字段和一个 last_name 字段。其中,id 字段被设置为主键。这样,我们可以将员工的 id 和姓名信息存储到这张表中。
相关推荐
![docx](https://img-home.csdnimg.cn/images/20210720083331.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)