zoukankan      html  css  js  c++  java
  • SQL SELECT INTO

    The SELECT INTO statement is usually used to create backup copies of tables.
    That also explain that SELECT INTO creates a new table and fills it with data computed by a query.

    SELECT INTO syntax is:

    SELECT [COLUMN NAME 1], [COLUMN NAME 2] ,...
    INTO [BACKUP TABLE NAME]
    FROM[TABLE NAME]


    EXAMPLE 1 :

    Let’s say we want to create a copy of the GameScores table and data.

    SQL Statement:

    SELECT * INTO GameScores_backup
    FROM GameScores

    SELECT INTO statement also can export the backup data to another database, let's see the example 2.


    EXAMPLE 2 :

    Let’s say we want to create a copy of the GameScores table and data to another database name backup_database.

    SQL Statement:

    SELECT * INTO GameScores_backup IN 'backup_database.mdb'
    FROM GameScores

  • 相关阅读:
    自动机
    C语言文法
    实验报告一:词法分析
    Python的基础综合练习
    Python基础综合练习
    turtle画五星红旗
    熟悉常用的Linux操作
    大数据概述
    对学习编译原理的看法
    LINUX
  • 原文地址:https://www.cnblogs.com/zhoug2020/p/3327819.html
Copyright © 2011-2022 走看看