yellownomad.blogg.se

Northwind database mysql download
Northwind database mysql download








northwind database mysql download

2 3*/Ĥ 5SELECT FirstName, LastName 6FROM Employees ORDER BY LastName 7 8 The above SELECT statement will return the following results:

northwind database mysql download

Syntax 1SELECT column, column 2FROM table 3ORDER BY column Note that columns in the ORDER BY clause do not have to appear in the SELECT clause.Ĭode Sample: SimpleSelects/Demos/OrderBy1.sql 1/* Select the FirstName and LastName columns from the Employees table. Sorting By a Single Column To sort by a single column, simply name that column in the ORDER BY clause. Sorting Records The ORDER BY clause of the SELECT statement is used to sort records. Not sure if you want to pay for that? Register for a free demo of the course. Like this SQL tutorial? Try our self-paced online SQL course, which includes videos and exercises in addition to the content in this SQL tutorial. 3*/ 4SELECT FirstName, LastName FROM Employees 5 The above SELECT statement will return the following results: Syntax 1SELECT table_lumn_name, table_lumn_name 2FROM table 3 - OR 4 5 6SELECT column, column FROM table 7Ĭode Sample: SimpleSelects/Demos/SelectCols.sqlġ/* 2Select the FirstName and LastName columns from the Employees table. SELECTing Specific Columns The following syntax is used to retrieve specific columns in all rows of a table. Like this SQL tutorial? Try our self-paced online SQL course, which includes videos and exercises in addition to the content in this SQL tutorial. SELECTing All Columns in All Rows The following syntax is used to retrieve all columns in all rows of a table.ġSELECT table.* 2FROM table 3 - OR 4 5 SELECT 6FROM * table 7Ĭode Sample: SimpleSelects/Demos/SelectAll.sql 1-Retrieve all columns in the Region table 2SELECT * 3FROM Region The above SELECT statement will return the following results:Īs you can see, the Region table has only two columns, RegionID and RegionDescription, and four rows. User-defined names, such as table names and column names may or may not be case sensitive depending on the operating system used. It is common practice to write reserved words in all capital letters. The two statements in the sample below are equally valid.Ĭode Sample: SimpleSelects/Demos/WhiteSpace.sql 1SELECT * FROM Employees 2 3SELECT * 4FROM Employees Ĭase Sensitivity SQL is not case sensitive. Multiple statements are separated with semicolons. Whitespace and Semi-colons Whitespace is ignored in SQL statements.

northwind database mysql download

#NORTHWIND DATABASE MYSQL DOWNLOAD CODE#

The code sample below shows some sample comments.Ĭode Sample: SimpleSelects/Demos/Comments.sql 1 Single-line comment 2-/* 3 Multi-line comment used in: -SQL Server 4 -Oracle 5 -MySQL 6 */ 7 However, some databases use other forms of comments as shown in the table below.Įxample - Comment # Comment /* Comment */ Some Basics Comments The standard SQL comment is two hyphens (-).

northwind database mysql download

In this lesson, we will explore some of these tables. The Northwind database has additional tables, but we will only be using the ones shown above. The diagram below shows the table structure of the Northwind database. Although the code taught in this class is not specific to Microsoft products, we use the Northwind database for many of our examples because many people are already familiar with it and because there are many resources for related learning that make use of the same database. The database contains the sales data for Northwind Traders, a fictitious specialty foods export-import company. Introduction to the Northwind Database The Northwind database is a sample database used by Microsoft to demonstrate the features of some of its products, including SQL Server and Microsoft Access.










Northwind database mysql download