Home Page for the TeradataForum
 

Archives of the TeradataForum

Message Posted: Sun, 24 Jul 2005 @ 13:54:27 GMT


     
  <Prev Next>   <<First <Prev
Next>
Last>>
 


Subj:   Re: Create set table: problem
 
From:   Dieter Noeth

Anomy Anom wrote:

  I was taking the practice test for TD SQL in one of the sites. The below question baffles me. Experts pls throw some light!  


  Question  


          > CREATE SET TABLE A (A Integer, B Integer) Unique Primary Index (A)
          > INSERT INTO Table A (1, 2)
          > INSERT INTO Table A (1, 1)
          > UPDATE Table A SET b = b + 1 WHERE b = 1.
          > Which statement is correct?
  Answers  


          > Both the INSERTs and the UPDATE fails.
          > The INSERTs work, but the UPDATE fails. (MISSED)
          > Only the first INSERT works. (INCORRECT)
          > Only the second INSERT works.
          > The CREATE TABLE fails.

Did you cut&paste the questions?

Then answer 1 is correct: Both the INSERTs and the UPDATE fails, because the "table" keyword will produce a syntax error.

If the table keyword is removed, then 3 is correct.


  Problem:  


  1. The first time i tried the create table and inserts, the 2 inserts did really work!! The show table showed a just a primary index instead of a UNIQUE PI.  


  2. The subsequent times i dropped and recreated the table, it does show a UPI and stops the second insert!  


Did you rerun exactly the same statements or did you retype them?


  Could anyone pl explain. Is (1) a figment of my own imagination -- did i miss seeing the UPI?? or is it possible?  


It should be impossible. Did you run it in QueryMan? Then you might check the history.

  The answer practice test question from the site adds to the confusion!!  


Which site, hopefully not NCR's :-)


Dieter



     
  <Prev Next>   <<First <Prev
Next>
Last>>
 
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 23 Jun 2019