-
Una vez en Teradata Studio Express, vaya a la perspectiva
Query Development
(vaya al menú superior y seleccioneWindow
→Query Development
). -
Conéctese utilizando el perfil de conexión creado previamente haciendo doble clic en
Database Connections
→New Teradata
. -
Usando el usuario
dbc
, crearemos una nueva base de datos llamadaHR
. Copie/pegue esta consulta y ejecútela presionando el botón ejecutar consulta () o presionando la tecla kbd:[F5]:
CREATE DATABASE HR AS PERMANENT = 60e6, -- 60MB SPOOL = 120e6; -- 120MB
-
Let’s create a sample table and insert some data and query it. We will first create a table to hold employee information:
CREATE SET TABLE HR.Employees ( GlobalID INTEGER, FirstName VARCHAR(30), LastName VARCHAR(30), DateOfBirth DATE FORMAT 'YYYY-MM-DD', JoinedDate DATE FORMAT 'YYYY-MM-DD', DepartmentCode BYTEINT ) UNIQUE PRIMARY INDEX ( GlobalID );
-
Now, let’s insert a record:
INSERT INTO HR.Employees ( GlobalID, FirstName, LastName, DateOfBirth, JoinedDate, DepartmentCode ) VALUES ( 101, 'Adam', 'Tworkowski', '1980-01-05', '2004-08-01', 01 );
-
Finally, let’s see if we can retrieve the data:
SELECT * FROM HR.Employees;
You should get the following results:
GlobalID FirstName LastName DateOfBirth JoinedDate DepartmentCode -------- --------- ---------- ----------- ---------- -------------- 101 Adam Tworkowski 1980-01-05 2004-08-01 1
Did this page help?