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

    May 10, 2011 · I am writing a Stored procedure in SQL Server 2008. I need to check if a table exists in the database. If it doesn't then I need to create it. How do I do this?

  2. CREATE TABLE IF NOT EXISTS equivalent in SQL Server

    Jun 29, 2011 · CREATE TABLE IF NOT EXISTS works on mysql but fails with SQL Server 2008 R2. What is the equivalent syntax?

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

    I would like this to be the ultimate discussion on how to check if a table exists in SQL Server 2000/2005 using SQL Statements. Here are two possible ways of doing it. Which one is the standard/bes...

  4. 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 't1' already …

  5. 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(*) FROM dba_tables

  6. ddl - Oracle 19c : Create Table If Not Exists - Stack Overflow

    Dec 24, 2021 · That's not valid syntax in Oracle. Here, you have to manually check whether table exists or not and then create it (or not). Exception you mentioned means that they used PL/SQL (not SQL). …

  7. Alter table if exists or create if doesn't - Stack Overflow

    May 30, 2013 · The SQL script creates tables, however, if there are already tables in the database, it should apply changes. In this version, it only works if there are additional columns.

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

    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') )) Since this is actually …

  9. SQL Server - Create temp table if doesn't exist - Stack Overflow

    Feb 28, 2017 · There is already an object named '#MyTable' in the database So it seems it doesn't simply ignore those lines within the If statement. Is there a way to accomplish this - create a temp …

  10. Criação de um banco de dados simples com o NOT EXISTS

    Feb 18, 2019 · Quando eu coloco este código para executar no MySQL, a primeira linha é executada sem nenhuma exceção, mas na segunda linha, o programa reconhece um erro lógico falando que a …