
This course includes our updated coding exercises so you can practice your skills as you learn.
See a demo
Welcome to Basic SQL CRUD! If you have not reviewed the lessons and material in my Basic SQL SELECT course, I recommend you do that first since it holds the foundations of what this course will cover. CRUD stands for create, read, update, and delete, and this course will describe some basic methods for writing these statements in SQL.
A quick look at 5 categories of SQL statements: DQL, DML, DDL, TCL, and DCL.
This course looks primarily at tables and views. A brief description will also be provided here of functions, triggers, and stored procedures. A text file containing object metadata queries is attached as a resource to this lecture.
A View acts just like a saved SELECT statement. Learn about the CREATE and DROP commands in SQL and how to create Views so that data tables do not have to continually be created in order to simply get a new view of the existing data.
Learn different methods to CREATE and DROP tables in SQL. Many of these methods will copy data from existing tables into the new table as well.
As a precaution against making inadvertent changes, we wrap statements within transactions. Learn how to set up basic transactions, and how to commit or roll back changes within transactions.
Looking at a couple utilities (in Microsoft SQL Server and Google BigQuery) that help import data into a database and export data from a database. Since this lesson focuses on utilities and not writing code, any questions pertaining to these should go to the support personnel of the respective companies that maintain these tools.
In this lesson, we look at ways to pull back a small set of the data from a table so we can quickly review what the data looks like. We explore TOP N, LIMIT N, FETCH FIRST/NEXT N, OFFSET, PERCENT, and WITH TIES.
Learn several SQL statements for inserting data into tables and deleting data from tables. An emphasis is placed on embedding these statements within transactions, when allowed, in order to alleviate the concerns of accidentally inserting or deleting the wrong data.
Learn multiple SQL statements for updating data records in tables. Also consider when to update and when to insert and delete. An emphasis is placed on embedding these statements within transactions, when allowed, in order to alleviate the concerns of accidentally damaging the data.
This lesson focuses on Microsoft SQL Server. Examining the impact of transactions on the data and on other users. Using save points to handle multiple changes within a transaction. Laying the groundwork for later learning on automated processes.
Learn the SQL MERGE INTO command, which combines inserting, updating, and deleting in one statement. Explanation is given for each section of the statement and for good uses and limitations of the statement. An emphasis is placed on embedding these statements within transactions, when allowed, to mitigate destroying large blocks of data in multiple ways. This is a stretch lesson for this course.
We'll take a look back at all we covered in this course.
With Basic SQL SELECT and Basic SQL CRUD, you have encountered the basics of the main statements to create, read, update, and delete data from a database. Come again and be on the lookout for my other courses!
The tools of business continue to change and grow. Long ago, paper and pencil replaced rote memory and more recently were themselves replaced by computers. Analysts used to work out calculations on calculators, then switched to spreadsheet applications, like Excel. Understanding SQL used to be a skill reserved for IT personnel; now, SQL is becoming an indispensable analytical tool in the modern workplace. Just like spreadsheets were once a tool known only to specialists but are now ubiquitous in the workplace, likewise SQL is beginning to become more accessible throughout organizations.
This course moves beyond the SELECT statement in SQL to basic constructions of creating and dropping database objects, importing into and exporting from the database, inserting into and deleting from the data tables, and updating the data. Many corporations require additional permissions in the database to allow someone to perform these operations, and as more and more analytics teams start working in databases, more businesspeople are being given these permissions.
I learned everything I know about SQL on the job, and so can you. After teaching for 10 years, I was pulled into IT at my first corporate position and have used SQL in every role since then. I know what it is like to learn a keyword for the first time, to start exploring its uses, to be shown tricks and techniques using it by others, and to eventually gain a deeper understanding of why it works the way it does. I have trained many others in SQL in companies large and small, including some Fortune 50 companies. I have compiled my experiences and curated from those lessons what I believe to be the important initial steps beyond simply selecting to share with you. I trust you will take this knowledge, and Spirit willing, share it with others.
If you have not yet reviewed Basic SQL SELECT in Udemy, look over that course first to make sure you are familiar with the material there. Understanding the SELECT statement and the various user interfaces in database systems will make this course that much easier to understand. When you are ready, please click on the first lecture in section 1, the starting point to work your way through this course.