Course Content

  • SQLQuery1

Course Content


  • CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype,
  • Example. CREATE TABLE Persons ( PersonID int, )
  • CREATE TABLE new_table_name AS. SELECT column1, column2, FROM existing_table_name.
  • Example. CREATE TABLE TestTable AS. SELECT customer name, contact name.

To do this, the SQL CREATE TABLE syntax is: CREATE TABLE new_table AS (SELECT * FROM old_table WHERE 1=2); For example: CREATE TABLE suppliers AS (SELECT * FROM companies WHERE 1=2);

One of the most essential T-SQL capabilities is the CREATE TABLE AS SELECT (CTAS) statement. CTAS is a concurrent operation that builds a new table from a SELECT statement's output. CTAS is the easiest and quickest way to create and insert data into a table with only one command.

The INSERT INTO SELECT statement transfers data from one table to another. The data types in the source and target tables must match for the INSERT INTO SELECT query to work. Existing records in the target table will not be modified.

  • If the database is shown under Recent, go to File > Open and choose it. If this is not the case, use one of the browse options to find the database.
  • Select the database you want to open in the Open dialogue box, then click Open.
  • Click Table in the Tables group on the Create tab.

Recommended Courses

Share With Friend

Have a friend to whom you would want to share this course?

Download LearnVern App

App Preview Image
App QR Code Image
Code Scan or Download the app
Google Play Store
Apple App Store
598K+ Downloads
App Download Section Circle 1
4.57 Avg. Ratings
App Download Section Circle 2
15K+ Reviews
App Download Section Circle 3
  • Learn anywhere on the go
  • Get regular updates about your enrolled or new courses
  • Share content with your friends
  • Evaluate your progress through practice tests
  • No internet connection needed
  • Enroll for the webinar and join at the time of the webinar from anywhere