A PHP Error was encountered

Severity: Warning

Message: fopen(/var/cpanel/php/sessions/ea-php70/ci_sessionvv122bfojvo3h1mbu69kpbb18vq38d71): failed to open stream: No space left on device

Filename: drivers/Session_files_driver.php

Line Number: 174

Backtrace:

File: /home/teksla5/public_html/application/controllers/Courses.php
Line: 10
Function: library

File: /home/teksla5/public_html/index.php
Line: 315
Function: require_once

A PHP Error was encountered

Severity: Warning

Message: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/teksla5/public_html/system/core/Exceptions.php:271)

Filename: Session/Session.php

Line Number: 143

Backtrace:

File: /home/teksla5/public_html/application/controllers/Courses.php
Line: 10
Function: library

File: /home/teksla5/public_html/index.php
Line: 315
Function: require_once

Triggers In TeraData

Triggers

Perform actions based on the event, that event is inserting, delete, update operations on tables.

Based on the actions, there are 2 types of triggers.

  • Before Trigger
  • After Trigger

a) Before trigger

Here action first, event next.

b) After Trigger

The event first, action NEXT.

Trigger applied at  2 Levels.

  1. ROW Level
  2. Statement Level

Note - In Tera data V2R5.1 onwards before trigger does not support

Inclined to build a profession as Teradata Developer? Then here is the blog post on, explore Teradata Training

Example

Create trigger< trigger name>()

Replace trigger< trigger name>()

Drop trigger< trigger name>

Help trigger< trigger name>

SHOW trigger< trigger name>

Alter trigger< trigger name>DISABLED

ALTER trigger< trigger name>ENABLED

2Create trigger< trigger name> Alter update of (column name)

ON<Table Name>Referencing OLD TALE AS OLD TABLE NEW VABLE AS NEW TABLE.

For each statement/Row

[Where condition]

(Trigger Action)

Example

Create Trigger Vinay after update of (party income) on party for each statement

(Insert into test(11,’Record update’,’00001’););

SHOW Trigger Vinay

Update party set party income=99999 where party id=2

Teradata Interview Questions

Example

Create table Translog

OLDVALU INTEGER,

NEW VALUE  INTEGER,

Record date format’ yyyy-mm-dd’ USE-UPDATED

Varchar (50)Default user

Create trigger Tr log

After update of(party income) on party

Referencing OLD AS O New AS N For Each Row

When(N. Party name>10000)

(Insert into translog (o. party income, N. party income, current-date);)

2update party set party income=40000 where party id =2

Limitations

We cannot use the below statement in the trigger body

Select statement to return as Result

Exception Handling

BEGIN And END Statements

COMMIT

DDL And DCL Statements

For In-depth knowledge on Teradata click on:

 

A PHP Error was encountered

Severity: Warning

Message: session_write_close(): Failed to write session data (user). Please verify that the current setting of session.save_path is correct (/var/cpanel/php/sessions/ea-php70)

Filename: Unknown

Line Number: 0

Backtrace: