TAILIEUCHUNG - Oracle SQL Plus The Definitive Guide- P21

Oracle SQL Plus The Definitive Guide- P21:Every day, computer professionals the world over wake up, travel to the office, sit down in front of a computer, and begin another day working with that database called Oracle. Programmers write queries and stored procedures. Database administrators monitor performance, make database changes, and perform other maintenance tasks. Operations people may need to back up or recover a database. | previous page page_176 next page Page 176 Syntax for DESCRIBE The syntax for the DESCRIBE command looks like this DESC RIBE schema. object_name @database_link_name where DESC RIBE Is the command which may be abbreviated to DESC. schema Is the name of the object s owner. This defaults to your username. object_name Is the name of the object often a table or a view that you want to describe. You can describe any of the following a table a view a stored procedure a stored function a stored package or an Oracle8 object type. database_link_name Is the name of a database link pointing to the database where the object exists. You only need to use this if the object you want to describe exists in a database other than the one to which you are currently connected. Your DBA can help create a database link if you need one. Describing a Table DESCRIBE is most often used to view the definition of a table or a view. Simply enter the command DESCRIBE followed by the name of the table or view you are interested in as the following example shows SQL DESCRIBE employee Name Null Type EMPLOYEE_ID EMPLOYEE_NAME EMPLOYEE_HIRE_DATE EMPLOYEE_TERMINATION_DATE EMPLOYEEBILLINGRATE NOT NULL NUMBER VARCHAR2 40 DATE DATE NUMBER If you aren t the owner of the table you can qualify the table or view name using the notation. This next example describes the ALL_ USERS view which is owned by the user SYS. SQL DESCRIBE Name Null Type USERNAME USER_ID CREATED NOT NULL VARCHAR2 30 NOT NOT NULL NUMBER NULL DATE previous page page_176 next page previous page page_177 next page Page 177 As you can see DESCRIBE just gives you a list of columns in the table or view along with their resulting datatypes lengths and nullability. If you need to know more such as whether or not a column has a default value you will need to query the data dictionary directly. You will see how to do this later in the chapter. In early releases of Oracle8 in particular the release the .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.