If you imagine it, envision it, create it... Teradata makes it Possible. Join us. "If you imagine it...Teradata makes it Possible. Register now.

  1. Una vez en Teradata Studio Express, vaya a la perspectiva Query Development (vaya al menú superior y seleccione WindowQuery Development).

  2. Conéctese utilizando el perfil de conexión creado previamente haciendo doble clic en Database ConnectionsNew Teradata.

  3. Usando el usuario dbc, crearemos una nueva base de datos llamada HR. Copie/pegue esta consulta y ejecútela presionando el botón ejecutar consulta (Botón Ejecutar consulta) o presionando la tecla kbd:[F5]:

    CREATE DATABASE HR
    AS PERMANENT = 60e6, -- 60MB
        SPOOL = 120e6; -- 120MB
    Were you able to run the query?
  4. 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 );
  5. 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
    );
  6. 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?
Also of interest