About 598,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 · 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. 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 …

  4. 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

  5. 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...

  6. sql - PostgreSQL create table if not exists - Stack Overflow

    See: How to check if a table exists in a given schema If the role executing this function does not have the necessary privileges to create the table you might want to use SECURITY DEFINER for the …

  7. 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). …

  8. sql server - Check if a temporary table exists and delete if it exists ...

    I am using the following code to check if the temporary table exists and drop the table if it exists before creating again. It works fine as long as I don't change the columns. If I add a column la...

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

    May 30, 2013 · Ok then create a mysql function that counts the results of SHOW TABLES LIKE 'myTable', if 0 create else alter? There is a lot of documentation on mysql functions.

  10. "Create table if not exists" - how to check the schema, too?

    Sep 3, 2012 · CREATE TABLE IF NOT EXISTS mytable (....) statements apparently only check for the table´s name. I would expect to get an exception if there's a table with the given name, but different …