About 478,000 results
Open links in new tab
  1. Check if table exists and if it doesn't exist, create it in SQL Server ...

    Aug 23, 2019 · CREATE TABLE #TempTable(ID INT) GO IF OBJECT_ID(N'TempDB.dbo.#TempTable', N'U') IS NOT NULL BEGIN PRINT 'Table Exists' …

  2. CREATE TABLE IF NOT EXISTS equivalent in SQL Server

    Jun 29, 2011 · Since this is the top question for this topic in Google even though it has been closed: if not exists (select * from sys.tables t join sys.schemas s on (t.schema_id = …

  3. MySQL "CREATE TABLE IF NOT EXISTS" -> Error 1050

    Using the command: CREATE TABLE IF NOT EXISTS `test`.`t1` ( `col` VARCHAR(16) NOT NULL ) ENGINE=MEMORY; Running this twice in the MySQL Query Browser results in: Table …

  4. SQL Server : check if table exists, otherwise create it

    Mar 3, 2017 · If i drop schema part - and use this - it appears to work: IF (NOT( EXISTS(SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = 'odds_soccer') )) …

  5. t sql - Check if table exists in SQL Server - Stack Overflow

    IF EXISTS (SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = N'Customers') BEGIN PRINT 'Table Exists' END Approach 2: Using OBJECT_ID() function. …

  6. sql - "Create table if not exists" - how to check the schema, too ...

    Sep 3, 2012 · CREATE TABLE IF NOT EXISTS ... is not a standard SQL code. The thing to do is to check if the table is already in the catalogue. For instance, in Java you may do something …

  7. Check table exist or not before create it in Oracle

    Trying to check is table exist before create in Oracle. Search for most of the post from Stackoverflow and others too. Find some query but it didn't work for me. IF((SELECT count(*) …

  8. sql - Create Table if not exists without columns - Stack Overflow

    Sep 20, 2013 · Create the table with the ID and only check for the existence of the Id column if you didn't have to create the table. IF NOT EXISTS (SELECT * FROM sys.objects WHERE …

  9. sql - Creating a database table if it does not exist in Java …

    The correct syntax is CREATE TABLE IF NOT EXISTS <name> (<columns>). Now I am also writing a JUnit test. Now I am also writing a JUnit test. If you have time, some help would be …

  10. sql server - How to Check table Exist or Not and then Create a …

    Aug 23, 2013 · Check if table exists and if it doesn't exist, create it in SQL Server 2008 (10 answers) Closed 11 years ago . I want to write code to check table already exist or not in SQL …