SQL Server database Creation table

Source: Internet
Author: User
Tags email account

CREATE Table Table Name
(
Column Name 1 characteristics of the data type column,
Column Name 2 characteristics of the data type column,
...
)


Note: Boolean True and FALSE can be converted to the following bit value: True converts to 1,false to 0
Source:
Use MySchool--Set the current database to MySchool
GO
CREATE TABLE Student--Creating student information tables
(
Studentno int NOT NULL,--study number, non-empty (required)
Loginpwd nvarchar () not NULL,--password, non-empty (required)
Studentname nvarchar () not NULL,--name, non-empty (required)
Sex bit NOT NULL,--gender, non-null (required)
Gradeid int not NULL,--grade number (required)
Phone nvarchar () not NULL,--Telephone
Borndate datetime not NULL,--date of birth (required)
Address nvarchar (255),--Addresses
Email nvarchar (50),--Email account
Identitycard varchar (18)--ID number
)
GO

SQL Server database Creation table

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.