Possible Duplicate:
SQL Server: Check if table exists
I'm working with Java and MS SQL Server 2008 and I want to create a table only after checking if it not already exists in the database.
public void addTestTable(){
jdbcTemplate.execute(
"create table [mydatabase].[dbo].[test] (ID integer not null identity, CREATEDBY varchar(50), CREATEDAT datetime, TITLE varchar(50), NRQUEST int, FORGROUP int, primary key(id))"
);
}
This is my createTable function, I need another boolean function for checking if the table already exists, but I don't know how to write the sql statement for it. Could anyone please help me?