我知道使用CREATE TABLE [example_schema].[example table]
在架构中创建表,但是我想在数据库中创建表,但是我不知道语法
CREATE TABLE Royal_Poly_DB.staff_relation (
"staff_no" CHAR(4) NOT NULL,
"staff_name" VARCHAR(100) NOT NULL,
"supervisor" CHAR(4) NULL,
"dob" DATE NOT NULL,
"grade" CHAR(5) NOT NULL,
"marital_status" CHAR(1) NOT NULL,
"pay" DECIMAL(7,2) NULL,
"allowance" DECIMAL(7,2) NULL,
"hourly_rate" DECIMAL(7,2) NULL,
"gender" CHAR(1) NOT NULL,
"citizenship" VARCHAR(10) NOT NULL,
"join_yr" INT NOT NULL,
"dept_cd" VARCHAR(5) NOT NULL,
"type_of_employment" CHAR(2) NOT NULL,
"highest_qln" VARCHAR(10) NOT NULL,
"designation" VARCHAR(20) NOT NULL,
PRIMARY KEY (staff_no))
右键单击对象资源管理器中的数据库,然后选择“新查询”,然后在其中添加代码