بتاريخ: 11 نوفمبر 200421 سنة comment_17918 Chapter3SQL * PLUS- SQL *PLUS: = is an Oracle Tool that lets you access the database structure directly. It can let you: 1-Build Tables, indexes. 2-Execute Queries. 3-Up date Database Objects, etc.SQL *PLUS: Enter your user name and SQL *PLUS will display the prompt "Enter password:"Using (SCOTT as a username) and (TIGER as a password)Then SQL *PLUS will display its prompt: SQL>.1-Creating a Table: = to create a table in an ORACLE database use the CREATE TABLE table_ name:(Column name type (size) [Null / Not Null], Column type (size) [Null / Not Null]...);*Example:- Create tableTo see a description of the my_emp table *How to create a table from other table:-SQL>create table DEPT 30 As select EMPNO, ENAME, SAL from MY_EMP where DEPTNO=30;Create table*To see the description of dept30, enter: 2- Altering a Table: - Use the Altering Table command to change the definition of a table. *Alter Table can do: 1-Add 2-ModifyFor example: = Alter table 3-Rename a Table:- To Rename a database object ,the syntax is :(RNAME old TO new)Example: SQL>Rename my_emp to B4cse;4-Dropping a Table: Mean Delete a Table;Example:- SQL>Drop table my_emp; تقديم بلاغ
انضم إلى المناقشة
يمكنك المشاركة الآن والتسجيل لاحقاً. إذا كان لديك حساب, سجل دخولك الآن لتقوم بالمشاركة من خلال حسابك.