C #-Create datasheet __c#

Source: Internet
Author: User
syntax for building a table

SQL Server Data type
https://technet.microsoft.com/zh-cn/library/ms187752 (v=sql.110). aspx

Creating data Tables

The datasheet has been built, but no data has been manually entered for several tests.

Back to Script page query

Batch statement:

Go is a flag for batch processing, which means that SQL Server compiles these SQL statements into an execution unit to improve execution efficiency.

It is generally the business requirements and code writers who decide to put some logically related business statements in the same batch.

Go is a batch command for SQL Server that only the code Editor can recognize and process, and editing other applications cannot use the command.

Because each batch is independent, it does not affect the operation of SQL code in other batches when a batch error occurs.

Create a score sheet, student management form, Class table .... Examples of system requirements:

Use studentmanagedb go if exists (SELECT * from sysobjects where name = ' Students ') drop table Students Go-Create student information datasheet CREA Te table Students (studentid int identity (10000,1),--Learning number studentname varchar () NOT NULL,--name Gender char (2) Not NULL,--sex birthday datetime NOT null,--Birth date Studentidno numeric (18,0) NOT null,--ID number age int not null,--year Age PhoneNumber varchar (m), studentaddress varchar (+), ClassId int NOT null-class foreign key) go--Create class table if exists (SE Lect * sysobjects where name= ' studentclass ') drop table studentclass go create table studentclass (classId int Primary key,--class number ClassName varchar () NOT NULL) go--Create a score table if exists (SELECT * from sysobjects where name= ' Scorel ist ') drop table scorelist go create table scorelist (Id int identity (1,1) primary key, StudentID int NOT null,-- The extra key CSharp int NULL, SQL Server int null, updatetime datetime NOT NULL-update time) Go--Create administrator table if exists (select * from sysobjects whereName= ' Admins ') drop table Admins go create table Admins (Loignid int identity (1000,1) primary key, Loignpwd Varcha R () NOT NULL,--login password adminname varchar () NOT NULL) go--Query datasheet SELECT * FROM Students

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.