1 / 11

SQL SELECT STATEMENT

BASIS DATA I/2009-GENAP. SQL SELECT STATEMENT. Oleh Satrio Agung Wicaksono, S.Kom., M.Kom. SQL SELECT STATEMENT. Objective. List the capabilities of SQL SELECT statements Execute a basic SELECT statement. SQL SELECT STATEMENT. Capabilities of SQL SELECT Statements. Projection. Selection.

medea
Download Presentation

SQL SELECT STATEMENT

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. BASIS DATA I/2009-GENAP SQL SELECT STATEMENT Oleh Satrio Agung Wicaksono, S.Kom., M.Kom BASIS DATA I/2009-GENAP

  2. SQL SELECT STATEMENT Objective • List the capabilities of SQL SELECT statements • Execute a basic SELECT statement BASIS DATA I/2009-GENAP

  3. SQL SELECT STATEMENT Capabilities of SQL SELECT Statements Projection Selection Table 1 Table 1 Join Table 2 Table 1 BASIS DATA I/2009-GENAP

  4. SQL SELECT STATEMENT Basic SELECT Statement • SELECT identifies the columns to be displayed • FROM identifies the table containing those columns SELECT *|{[DISTINCT] column|expression [alias],...} FROM table; BASIS DATA I/2009-GENAP

  5. SQL SELECT STATEMENT Selecting All Columns SELECT * FROM departments; BASIS DATA I/2009-GENAP

  6. SQL SELECT STATEMENT Selecting Specific Columns SELECT department_id, location_id FROM departments; BASIS DATA I/2009-GENAP

  7. SQL SELECT STATEMENT Writing SQL Statements • SQL statements are not case-sensitive. • SQL statements can be on one or more lines. • Keywords cannot be abbreviated or splitacross lines. • Clauses are usually placed on separate lines. • Indents are used to enhance readability. BASIS DATA I/2009-GENAP

  8. SQL SELECT STATEMENT Arithmetic Expressions BASIS DATA I/2009-GENAP

  9. SQL SELECT STATEMENT Using Arithmetic Operators SELECT last_name, salary, salary + 300 FROM employees; BASIS DATA I/2009-GENAP

  10. … SQL SELECT STATEMENT Operator Precedence SELECT last_name, salary, 12*salary+100 FROM employees; SELECT last_name, salary, 12*(salary+100) FROM employees; BASIS DATA I/2009-GENAP

  11. P E N U T U P Terima kasih BASIS DATA I/2009-GENAP

More Related