CREATE Table Common Commands

Source: Internet
Author: User

CREATE TABLE Students (stuid INTEGER not     null, Stuname char (+) not     null,sex     int not     null); CREATE TABLE Students (stuid INTEGER not     NULL, Stuname char (+) not     null,sex     int not     null,primary KEY ( STUID)); CREATE TABLE Students (stuid INTEGER not     null PRIMARY key,stuname char (a) not     null,sex     int not     null); CREATE TABLE score (Scoreid integer not NULL PRIMARY key,stuid     integer not null,kemuid     integer not Null,score
   float,foreign KEY SCORE_ID_FK (stuid) REFERENCES students (STUID), CONSTRAINT chk_score_zip CHECK (Score > 0)); show T Ables;insert into students values (1, ' Zhang San ', 1); SELECT * from Students;insert to Studentsselect * from Students;delete STUDENTS from studentswhere stuid = 1;drop TABLE STUDENTS; ALTER TABLE STUDENTS ADD CONSTRAINT PRIMARY KEY (STUID); ALTER TABLE STUDENTS ADD PRIMARY KEY (STUID);


CREATE Table Common Commands

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.