Basic Operations for Database statements (MON10-DAY21)

Source: Internet
Author: User

--Create user  Create UserYanlong identified by 123456;--Switch UsersConn Yanlong/123456;--Change Passwordpassword Yanlong; Alter UserYanlong identified by 123;--Add Data   Insert TableStudent (ID Number);--Add Data   Insert  intoStudent1);--Querying Data   Select * fromstudent;--Delete a table   Drop Tablestudent;--Reclaim PermissionsRemoke Connect fromstudent; Remoke Resource fromstudent;--using Yanlong to build a table   Create TableStudents (ID, Number);--granting Permissions   GrantConnect,resource tostudent;--Delete User   Drop  Userstudent;--Create a table  Create TableStudents (ID Number, namevarchar2( +), SexChar(2), birthday date, score Number(5,1), resume clob);-------Modifying a table      --basic operations for adding columns      Alter TableStudentsAdd(class_id Number); --modifying the properties of a column      Alter TableStudents Modify (Score Number(5,1)); ---Delete Columns      Alter TableStudentsDrop(score); Alter TableStudentsDrop columnscore; --Modify Table nameRename Students tostudent; --Modify column names      Alter TableStudent Renamecolumnclass_id tocId;-------Add Data       ---Insert Data       Insert  intoStudentValues(1,'Chen Yanlong','male','October-October on -2017',321,1001); --Change Data       UpdateStudentSetName='John Doe' whereId=1; 

Basic Operations for Database statements (MON10-DAY21)

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.