From: | "John Geng" <lanlz(at)sina(dot)com> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org <pgsql-sql(at)postgresql(dot)org> |
Subject: | |
Date: | 2002-10-16 09:31:18 |
Message-ID: | 20021016093329.B6166476043@postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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!!
From | Date | Subject | |
---|---|---|---|
Next Message | Albrecht Berger | 2002-10-16 10:07:59 | replace null with 0 in subselect ? |
Previous Message | John Geng | 2002-10-16 09:15:19 | help! |