About 668,000 results
Open links in new tab
  1. How to create a table in a particular database? - Stack Overflow

    May 29, 2017 · So you can create a table (student) in a particular database (schoolmanagementsystem) following this way. CREATE TABLE …

  2. Check if table exists and if it doesn't exist, create it in SQL Server ...

    Aug 23, 2019 · Let us create a sample database with a table by the below script: CREATE DATABASE Test GO USE Test GO CREATE TABLE dbo.tblTest (Id INT, Name …

  3. SQL Server tables: what is the difference between @, # and

    Feb 8, 2010 · ##table is a global temporary table and for the record in over 10 years of using SQL Server I have yet to come across a valid use case. I'm sure that some exist but the nature of …

  4. Create SQL table with the data from another table

    Aug 7, 2010 · The most portable means of copying a table is to: Create the new table with a CREATE TABLE statement; Use INSERT based on a SELECT from the old table: INSERT …

  5. How to add a column with a default value to an existing table in …

    Sep 18, 2008 · First create a table with name student: CREATE TABLE STUDENT (STUDENT_ID INT NOT NULL) Add one column to it: ALTER TABLE STUDENT ADD …

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

    Mar 20, 2017 · 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 …

  7. What is the use of the square brackets [] in sql statements?

    They are useful to identify each elements in SQL. For example: CREATE TABLE SchemaName.TableName ( This would actually create a table by the name …

  8. sql - Error 1046 No database selected, how to resolve? - Stack …

    You can specify the default schema/database/catalog for the connection - click the "Manage Connections" options under the SQL Development heading of the Workbench splash screen. …

  9. SQL: how to specify a date format on creating a table and fill it

    Dec 22, 2016 · I want to save the date in format 'dd.mm.yyyy'. So I read there are different formats for a date in SQL (by the way I use Visual Studio and SQL Server). I tried this code: …

  10. sql server - How do I create a table based on another table - Stack ...

    Aug 15, 2013 · In SQL Server you can use this query to create an empty table: SELECT * INTO {schema_name}.newtable FROM {schema_name}.oldtable WHERE 1 = 0; (If you want to …

Refresh