From the course: Oracle Database 12c: Basic SQL
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
SQL query structure - Oracle Database Tutorial
From the course: Oracle Database 12c: Basic SQL
SQL query structure
- Before we'll start writing our own SQL queries, let's first understand at a high level, the basic syntax which makes a SQL query function and retrieve data from the database. The core syntax of a SQL query can be divided into a select clause, a from clause, and usually also a where clause. Let's review each one of these clauses, and understand their function. The from clause is where we specify the name of the database table or tables, in plural, from which we want to retrieve data. So for example, from employees specifies that we want to retrieve data from the employees table. The select clause, or select part of our SQL query is where we can specify the column names that we wish to return as part of the output of our query, so for example, if we have an employees table, which contains three columns: ID, Name, and Salary, and we specify in our SQL query to select the ID and name column from employees, we essentially tell Oracle to return the ID and Name columns only, ignoring the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.