CREATE TABLE Customer
(
CustID int IDENTITY(1,1) ,
customerNo AS 'C' + CAST(CustID AS VARCHAR(10)) PERSISTED PRIMARY KEY,
customerName varchar(50),
customerStreet varchar(20),
customerCity varchar(50),
customerState varchar(50),
customerZIPCode varchar(20),
customerTelNo varchar(50),
custFaxNo varchar(50),
DOB varchar(50),
maritalStatus varchar(50),
creditRating varchar(50),
)
INSERT INTO Customer (customerName, customerStreet, customerCity, customerState, customerZIPCode, customerTelNo, custFaxNo, DOB, maritalStatus, creditRating)
VALUES ('Ana A.', '10', 'Charlotte', 'North Carolina', '28205', '+655 323 4545', '+655 323 4546', '16-02-1975', 'Married', '90%')
CREATE TABLE Employee
(
EmpID int IDENTITY(1,1) ,
employeeNo AS 'E' + CAST(EmpID AS VARCHAR(10)) PERSISTED PRIMARY KEY,
title varchar(10),
firstName varchar(50),
middleName varchar(50),
lastName varchar(50),
address varchar(100),
workTelExt varchar(50),
homeTelNo varchar(50),
empEmailAddress varchar(50),
socialSecurityNumber varchar(50),
DOB varchar(50),
position varchar(50),
sex varchar(20),
salary varchar(20),
dateStarted varchar(20),
)
INSERT INTO Employee (title, firstName, middleName, lastName, address, workTelExt, homeTelNo, empEmailAddress, socialSecurityNumber, DOB, position, sex, salary, dateStarted)
VALUES ('Ms', 'Ana', 'A', 'Daven', '11, Charlotte, North Carolina, 28205', '+655 856 9786', '+655 374 4639', 'Ana.Daven@nc.co.com', 'A5403B32', '16-10-1975', 'Senior Officer', 'Female', '$4000', 'Jan 2001')
CREATE TABLE Orders
(
EmpID int IDENTITY(1,1),
orderNo AS 'E' + CAST(EmpID AS VARCHAR(10)) PERSISTED PRIMARY KEY,
orderDate varchar(20),
billingStreet varchar(50),
billingCity varchar(50),
billingState varchar(50),
billingZipCode varchar(50),
promisedDate varchar(20),
status varchar(20),
customerNo varchar(11),
employeeNo varchar(11),
CONSTRAINT fk_PerCustomer FOREIGN KEY (customerNo)
REFERENCES Customer(customerNo),
CONSTRAINT fk_PerEmployee FOREIGN KEY (employeeNo)
REFERENCES Employee(employeeNo)
)
"使用什么语句来导入customerNo和employeeNo。同时INSERTING VALUES到(orderDate,billingStreet,billingCity,billingState,billingZipCode,promisedDate,status)"单行数据?