About 714,000 results
Open links in new tab
  1. 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?

  2. How to add a column with a default value to an existing table in SQL ...

    Jun 21, 2016 · ALTER TABLE [dbo.table_name] ADD [Column_Name] BIT NOT NULL Default ( 0 ) Here is another way to add a column to an existing database table with a default value. A much more …

  3. How to create a table using "With" clause in SQL

    Mar 20, 2017 · 14 This is not valid syntax for sql server. you can either create a table using CREATE TABLE and specifying the column names and types, or you can do a SELECT INTO statement …

  4. sql - Create Table from View - Stack Overflow

    Jul 14, 2011 · See this answer will help you. script on this answer get you scripts for generate all tables in database. If you modify last where condition, you can get scripts for create table from views. The …

  5. How to create temp table using Create statement in SQL Server?

    Mar 26, 2017 · An equivalent of this is , a declared table variable. This has a little less "functions" (like indexes etc) and is also only used for the current session. The is one that is the same as the , …

  6. sql - Oracle create table using with clause - Stack Overflow

    Mar 25, 2011 · Can I create a table from a query formed using with clause?

  7. How do I create a foreign key in SQL Server? - Stack Overflow

    I have never "hand-coded" object creation code for SQL Server and foreign key decleration is seemingly different between SQL Server and Postgres. Here is my sql so far: drop table exams; drop table

  8. sql - How to create id with AUTO_INCREMENT on Oracle? - Stack …

    It appears that there is no concept of AUTO_INCREMENT in Oracle, up until and including version 11g. How can I create a column that behaves like auto increment in Oracle 11g?

  9. 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?

  10. sql - How to create Temp table with SELECT - Stack Overflow

    Jul 15, 2012 · Note also that any temporary table created inside a stored procedure is automatically dropped when the stored procedure finishes executing. If stored procedure A creates a temp table …