[Go-essp-tech] Idempotent SQL?
    Cinquini, Luca (3880) 
    Luca.Cinquini at jpl.nasa.gov
       
    Fri Feb  4 10:50:37 MST 2011
    
    
  
Hi Gavin,
this kind of statements worked for Java H2DB - not sure about postgres...
-- WORKFLOW INSTANCE TYPE
CREATE TABLE IF NOT EXISTS WORKFLOW_INSTANCE_TYPE (
TYPE INT PRIMARY KEY NOT NULL,
DESCRIPTION VARCHAR(200) NOT NULL
);
MERGE INTO WORKFLOW_INSTANCE_TYPE (TYPE, DESCRIPTION ) VALUES (1, 'DESDynI Standard');
Luca
On Feb 4, 2011, at 10:45 AM, Gavin M. Bell wrote:
Hey SQL Mavens...
Does anyone know how to create idempotent SQL scripts?
If something is there already, then don't create it...
If it is not, then do so.
(the pithier the better)
Thanks
--
Gavin M. Bell
Lawrence Livermore National Labs
--
 "Never mistake a clear view for a short distance."
               -Paul Saffo
(GPG Key - http://rainbow.llnl.gov/dist/keys/gavin.asc)
 A796 CE39 9C31 68A4 52A7  1F6B 66B7 B250 21D5 6D3E
_______________________________________________
GO-ESSP-TECH mailing list
GO-ESSP-TECH at ucar.edu<mailto:GO-ESSP-TECH at ucar.edu>
http://mailman.ucar.edu/mailman/listinfo/go-essp-tech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/go-essp-tech/attachments/20110204/81a045c1/attachment.html 
    
    
More information about the GO-ESSP-TECH
mailing list