zoukankan      html  css  js  c++  java
  • mysql 创建临时表

     

     创建临时表

    create TEMPORARY table SalesSummary(
    product_name VARCHAR(50) NOT NULL,
    total_sales DECIMAL(12,2) NOT NULL DEFAULT 0.00,
    avg_unit_price DECIMAL(7.2) NOT NULL DEFAULT 0.00,
    total_units_sold INT UNSIGNED NOT NULL DEFAULT 0
    );

    插入数据

    INSERT INTO SalesSummary
        (product_name, total_sales, avg_unit_price, total_units_sold)
        VALUES
        ('cucumber', 100.25, 90, 2);
    
    SELECT * from SalesSummary

     删除临时表

    DROP TABLE SalesSummary;
  • 相关阅读:
    6-1
    4-9
    4-5
    4-4
    4-3
    3-10
    作业三2
    作业三1
    课堂练习二
    实验三
  • 原文地址:https://www.cnblogs.com/gylhaut/p/9212561.html
Copyright © 2011-2022 走看看