文件名称:选出所有的列-SQL语言基础
文件大小:5.26MB
文件格式:PPT
更新时间:2024-05-15 13:24:45
SQL 基础
选出所有的列 * DEPTNO DNAME LOC --------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAGO 40 OPERATIONS BOSTON 40 OPERATIONS BOSTON SQL> SELECT * 2 FROM dept; * 显示列的变化,缺省与数据库一致,可以改变列的现实顺序。 Selecting All Columns, All Rows You can display all columns of data in a table by following the SELECT keyword with an asterisk (*). In the example on the slide, the department table contains three columns: DEPTNO, DNAME, and LOC. The table contains four rows, one for each department. You can also display all columns in the table by listing all the columns after the SELECT keyword. For example, the following SQL statement, like the example on the slide, displays all columns and all rows of the DEPT table: Instructor Note Let the students know that details of all the tables are given in Appendix B. SQL> SELECT deptno, dname, loc 2 FROM dept;