WSL2-在Ubuntu-22.04上安装MySQL(deb包)并配置ODBC

时间:2024-03-10 18:54:55
create database mysql_ssb_1; use mysql_ssb_1; create table customer( c_custkey integer, c_name varchar(25) not null, c_address varchar(40) not null, c_city varchar(10) not null, c_nation varchar(15) not null, c_region varchar(12) not null, c_phone varchar(15) not null, c_mktsegment varchar(10) not null); create table dwdate( d_datekey integer, d_date varchar(18) not null, d_dayofweek varchar(18) not null, d_month varchar(9) not null, d_year integer not null, d_yearmonthnum integer, d_yearmonth varchar(7) not null, d_daynuminweek integer, d_daynuminmonth integer, d_daynuminyear integer, d_monthnuminyear integer, d_weeknuminyear integer, d_sellingseason varchar(12) not null, d_lastdayinweekfl integer, d_lastdayinmonthfl integer, d_holidayfl integer, d_weekdayfl integer); create table supplier( s_suppkey integer, s_name varchar(25) not null, s_address varchar(25) not null, s_city varchar(10) not null, s_nation varchar(15) not null, s_region varchar(12) not null, s_phone varchar(15) not null); create table part( p_partkey integer, p_name varchar(22) not null, p_mfgr varchar(6) not null, p_category varchar(7) not null, p_brand varchar(9) not null, p_color varchar(11) not null, p_type varchar(25) not null, p_size integer not null, p_container varchar(10) not null); create table lineorder( lo_orderkey bigint, lo_linenumber bigint, lo_custkey integer not null, lo_partkey integer not null, lo_suppkey integer not null, lo_orderdate integer not null, lo_orderpriotity varchar(15) not null, lo_shippriotity integer, lo_quantity bigint, lo_extendedprice bigint, lo_ordtotalprice bigint, lo_discount bigint, lo_revenue bigint, lo_supplycost bigint, lo_tax bigint, lo_commitdate integer not null, lo_shipmode varchar(10) not null); create table if not exists `lineorder_flat` ( `lo_orderkey` int(11) not null comment "", `lo_orderdate` date not null comment "", `lo_linenumber` tinyint(4) not null comment "", `lo_custkey` int(11) not null comment "", `lo_partkey` int(11) not null comment "", `lo_suppkey` int(11) not null comment "", `lo_orderpriotity` varchar(100) not null comment "", `lo_shippriotity` tinyint(4) not null comment "", `lo_quantity` tinyint(4) not null comment "", `lo_extendedprice` int(11) not null comment "", `lo_ordtotalprice` int(11) not null comment "", `lo_discount` tinyint(4) not null comment "", `lo_revenue` int(11) not null comment "", `lo_supplycost` int(11) not null comment "", `lo_tax` tinyint(4) not null comment "", `lo_commitdate` date not null comment "", `lo_shipmode` varchar(100) not null comment "", `c_name` varchar(100) not null comment "", `c_address` varchar(100) not null comment "", `c_city` varchar(100) not null comment "", `c_nation` varchar(100) not null comment "", `c_region` varchar(100) not null comment "", `c_phone` varchar(100) not null comment "", `c_mktsegment` varchar(100) not null comment "", `s_name` varchar(100) not null comment "", `s_address` varchar(100) not null comment "", `s_city` varchar(100) not null comment "", `s_nation` varchar(100) not null comment "", `s_region` varchar(100) not null comment "", `s_phone` varchar(100) not null comment "", `p_name` varchar(100) not null comment "", `p_mfgr` varchar(100) not null comment "", `p_category` varchar(100) not null comment "", `p_brand` varchar(100) not null comment "", `p_color` varchar(100) not null comment "", `p_type` varchar(100) not null comment "", `p_size` tinyint(4) not null comment "", `p_container` varchar(100) not null comment "");