Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Building tables with PL/SQL

2025-04-06 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

First of all, before building a table, be sure to be clear about the use of the table you are about to build. What I want to say is to operate on pl/sql.

Create the table SQL in oracle as follows:

The name of the table to be created by create table

The type of field 1 (such as varchar,num, etc., and the field type is followed by parentheses, and the number of upper limit positions is written in parentheses)

Type of field 2

Type of field 3

.

)

Note: when the database is not case-sensitive, but the field type is different, sometimes you need to add quotation marks. Secondly, if one of the fields needs to be set as the primary key, you need to add primary key after the field type.

Examples are as follows:

Create table com_depot (

Depot_code varchar (100)

Depot_name varchar (100)

Default_storager varchar (100)

Depot_temp_property varchar (100)

Depot_temp varchar (100)

Depot_type varchar (100)

Depot_rep_rules varchar (100)

Depot_other varchar (100)

)

In this way, click on the pinion on PLSQL, that is, Execute execution, and then select * from com_depot to check and deal with the newly created table.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report