--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)