pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: John Geng <lanlz@sina.com>
To: pgsql-sql@postgresql.org <pgsql-sql@postgresql.org>
Subject: help!
Date: Wed, 16 Oct 2002 17:15:19 +0800
Message-ID: <20021016091128.D2625475BF9@postgresql.org> (raw)

how to migrate sql from MS sql server to postgresql?
i'd like to tranfer sql schema from MS server
Example:
*******************1*********************************
if exists (select * from sysobjects 
where id = object_id(N'[admin].[test]') and 
OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [admin].[test] 
go
*******************2*********************************
CREATE TABLE [admin].[test] (
[test_name] [char] (50) NOT NULL ,
[test_value] [int] NOT NULL 
)

   i can only realize part 2. i don't know how to realize part 1.in other words,
i want to know how to check if a table exist in postgresql
*******************2*********************************
  create table test(
   test_name char (50) not null,
   test_value int not null
  )

thanks for any advice!!

view thread (36+ messages)  latest in thread

Message-ID: <20021016091128.D2625475BF9@postgresql.org>
Permalink:  ../20021016091128.D2625475BF9@postgresql.org/
Also on:    postgresql.org/message-id/20021016091128.D2625475BF9@postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: lanlz@sina.com
  Subject: Re: help!
  In-Reply-To: <20021016091128.D2625475BF9@postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox