SQL is an industry-standard language for accessing mainframe, midrange and LAN-based, multi-user relational databases. This course will teach the delegate how to read and write good SQL for querying, updating and maintaining SQL databases. The course progresses through the elements of the language to build a thorough appreciation and understanding of SQL’s capabilities and power. It covers ANSI-standard SQL and some of the common extensions.
This course is made up of a mix of theory and practical sessions. You will complete a series of exercises that cover all the important components of the language and allow you to practise your SQL.
Please Note: The course will use a Microsoft SQL Server platform and T-SQL in all labs and practices to illustrate the use of the SQL language
This course is suitable for anyone wishing to use SQL to access data. This course is a common prerequisite for those going on our client/server or database courses.
At the end of this course you will be able to:
Introduction to Relational Databases
•The need for an SQL standard; The ANSI standards; What is a database?; What is a relational database?; Components of a relational database; Normalised data; Anatomy of a table; Primary and foreign keys; Joins; Components of SQL
Data Manipulation Language
•SELECT operations; DISTINCT; Virtual columns; Column aliases; Functions; Restricting the rows returned; Multiple conditions; Ordering data; Inserting rows; Updating rows; Deleting rows
•The theory of joining tables; Cross, Inner, Outer, Full, Left and Right; Composite joins; Table aliases;
Data Definition Language
•Data types; Column attributes; Create table; Primary and foreign keys; Referential integrity; Alter and drop tables
•Defining simple views; Views with virtual columns; Restricted-column views; Joined-table views; Restricted-row views; View restrictions
•Table aggregates; GROUP BY and aggregates; The HAVING clause
•Using simple Subqueries; EXISTS; Correlated Subqueries
•Union; Intersect; Except/Minus