--Creating the Selfstudy database, creating the Databases Constructiondbonprimary--Create the main database file (name= ' Constructiondb ',--the physical name of the data file Filename= ' D:\Project\ constructiondb.dbf ',--the name and path of the data file SIZE=5MB,--initial capacity of the data file maxsize= 20MB,--data file maximum capacity FILEGROWTH=1MB--data file growth) log on--Create log file (name= ' constructiondb ',--the logical name of the data file Filename= ' D:\Project\ Constructiondb.ldf ',--the name and path of the data file SIZE=2MB,--the initial capacity of the data file MAXSIZE=20MB,--Maximum capacity of the data file FILEGROWTH=1MB-data file growth) Gouse CONSTRUCTIONDBGO---3.2 Creating data tables CREATE TABLE T_enterprise_info (Ent_idchar (+) NOT NULL,--Enterprise number primary key Ent_namevarchar (+) not Nu ll,--enterprise name Begin_datedatetime,--settling Time--date type Addrvarchar (,--) Detailed address reg_capital decimal (12,4),--registered Capital value type, Unit: million)-- Inserting data insert into T_enterprise_infoselect ' 200200078 ', ' Changsha Urban Construction Co., Ltd. ', ' 2002-01-01 ', ' Changsha Tianxin District ', the Union Allselect ' 200400005 ', ' Tian Shin Construction Enterprise Co., Ltd. ', ' 2004-01-01 ', ' Changsha furong ', 1500--set primary key ALTER TABLE T_ENTERPRISE_INFOADD constraint Pk_t_enterprise_info_ ENT_ID primary KEY (ent_id) SELECT * FROM T_enterprise_info
SQL's Construction Engineering Supervision information System