更新时间:2023-01-23 12:44:48
1)像往常一样通过SqlConnection连接到数据库
2)构造一个SqlCommand CREATE TABLE命令.
1) Connect to your database via an SqlConnection as usual
2) Construct a SqlCommand CREATE TABLE Command.
CREATE TABLE [dbo].[myTable](
[id] [int] IDENTITY(1,1) NOT NULL,
[amount] [int] NOT NULL,
[dat] [nchar](10) NULL,
[amountOwed] [float] NOT NULL
) ON [PRIMARY]
3)使用ExecuteNonQuery方法.
3) Use the ExecuteNonQuery method.