sqlserver 根据实体类public class ReportMenu { /*报表id*/ private Integer id; /*报表分组*/ private String reportGroup; /*报表名称*/ private String reportName; /*报表路径*/ private String reportUrl; public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getReportGroup() { return reportGroup; } public void setReportGroup(String reportGroup) { this.reportGroup = reportGroup; } public String getReportName() { return reportName; } public void setReportName(String reportName) { this.reportName = reportName; } public String getReportUrl() { return reportUrl; } public void setReportUrl(String reportUrl) { this.reportUrl = reportUrl; } }构建建表sql
时间: 2024-01-11 15:02:43 浏览: 70
sqlserver建表sql
根据这个实体类,可以建立以下的建表sql:
```
CREATE TABLE [dbo].[ReportMenu](
[id] [int] NOT NULL,
[reportGroup] [nvarchar](50) NULL,
[reportName] [nvarchar](50) NULL,
[reportUrl] [nvarchar](100) NULL,
CONSTRAINT [PK_ReportMenu] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
```
其中,id为主键,reportGroup、reportName、reportUrl为普通字段,数据类型分别为nvarchar和int,长度根据实际需求进行调整。
阅读全文