SQL数据库中建立表格.pdfVIP

  • 62
  • 0
  • 约3.96千字
  • 约 4页
  • 2017-06-09 发布于河南
  • 举报
SQL数据库中建立表格

在用户数据库中建立表格: 建表过程:先要切换到用户数据库为当前数据库,该数据库中检测要建的表是否存在,如果存 在,先删除,再建。 检测之后,无论原来表是否存在,都会不存在。 usetest go if exists(selectname fromsysobjectswherename=studentand xtype=u) droptable student go create table student ( studentIdchar(5), studentName nvarchar(4), studentAge int, addressnvarchar(20), studentDescnvarchar(100), ) go C++中的结构: classStudent { charstudentId[6]; charstudentName[9]; int studentAge; charaddress[41]; }; classStudent { char*id; char*name; int age; char*address; }; --向表填充记录(行)

文档评论(0)

1亿VIP精品文档

相关文档