06:44
1,0×
00:00/06:44
451,3 тыс смотрели · 4 года назад
Creating Tables Tables are the basic unit of data storage in an Oracle Database. Data is stored in rows and columns. You define a table with a table name, such as employees, and a set of columns. You give each column a column name, such as employee_id, last_name, and job_id; a datatype, such as VARCHAR2, DATE, or NUMBER; and a width. The width can be predetermined by the datatype, as in DATE. If columns are of the NUMBER datatype, define precision and scale instead of width. A row is a collection of column information corresponding to a single record. You can specify rules for each column of a table. These rules are called integrity constraints. One example is a NOT NULL integrity constraint. This constraint forces the column to contain a value in every row. create table DEPARTMENTS ( deptno number, name varchar2(50) not null, location varchar2(50), constraint pk_departments primary key (deptno) );
865 читали · 6 лет назад
Печеньки от Oracle. Экспорт/импорт с помощью XML
Перенос данных из систему 1 в систему 2 несколько необычным образом. Предположим, в системе 1 есть некоторые данные, которые нам надо перенести в систему 2. Предположим, они доступны с использованием следующего запроса: select arg, func from system1.square_test ; 1 1 2 4 3 9 4 16 5 25 6 36 7 49 8 64 9 81 10 100 Чтоб перенести их традиционным способом, нужно записать DDL создания принимающей таблицы (если ее нет) и скрипт DML для всех строк данных. Что-то типа: create table system2.square_test (arg number, func number); insert into system2...