Skip to content

PowerBI Self-Study Course & SQL Deep Dive: Truncate vs Delete

Major Announcement: New AI-Powered Self-Study Platform

The instructor reveals a revolutionary new self-study course built by his brother using AI technology. This is not a standard video course.

  • Format: The course includes embedded videos (using the instructor's voice and likeness), detailed written documentation, screenshots, downloadable links, and interactive quizzes.
  • Scope: The PowerBI course alone features 93 videos covering everything from basics to advanced DAX formulas. The plan is to expand this to 30-40 different skill sets by January, including Tableau, Azure Data Factory, and more.
  • Key Differentiator: The platform extracts information directly from official sources (like MSDN) and existing video content to create a structured, comprehensive learning path with actual code examples.
  • Future Release: The instructor plans to embed this into the main website but will not release it to students until after the current SQL course is complete to ensure focus.

Deep SQL Dive: Views, Constraints & Indexes

The class transitions into a technical SQL session, focusing on interview-critical topics.

Understanding Views

  • Definition: A view is a "named SELECT statement" or a virtual table. It does not physically store data.
  • Materialized View: A view only becomes physically stored on disk when you add an index to it (creating an indexed view).

Primary Key vs. Unique Key Constraints

  • Primary Key: Uniquely identifies each row, does not allow NULLs, and automatically creates a Clustered Index.
  • Unique Key: Uniquely identifies each row but allows one NULL value. It automatically creates a Non-Clustered Index.
  • Index Architecture: Clustered vs. Non-Clustered
    • Clustered: Stores the actual data pages at the leaf level of the B-tree. You can only have one per table.
    • Non-Clustered: Contains pointers at the leaf level that point to the data location. You can have up to 999 per table.

The Definitive Guide: TRUNCATE vs. DELETE

This is a classic SQL interview question. The instructor breaks down every possible answer. For a more detailed exploration of advanced SQL commands and optimization strategies, see Master SQL: Comprehensive Guide to Advanced Data Analytics and Optimization.

TRUNCATE (DDL - Data Definition Language)

  • Removes all rows from a table.
  • Faster because it deallocates data pages; only the page deallocations are logged.
  • Resets the identity column (seed) back to its original value.
  • Cannot be used if the table is referenced by a FOREIGN KEY.
  • Command output: "Command completed successfully."

DELETE (DML - Data Manipulation Language)

  • Removes rows one at a time; each row deletion is recorded in the transaction log.
  • Slower than TRUNCATE and uses more log resources.
  • Does NOT reset the identity column.
  • Can be used with a WHERE clause to delete specific rows.
  • Command output: Shows the number of rows affected (e.g., "104 rows affected").

Hands-On Lab: Lab #2

The instructor walks through a practical SQL lab using a movie database to reinforce concepts. This practical application mirrors the portfolio-building approach in the Comprehensive Bank Loan Data Analyst Portfolio Project Tutorial.

  • CTE with Ranking: Used ROW_NUMBER() OVER (PARTITION BY Genre ORDER BY BoxOfficeGross DESC) to find the top 2 movies from each genre.
  • Transaction Control: Practiced BEGIN TRANSACTION, DELETE (western genre), ROLLBACK to show how to reverse deletions.
  • String Functions: Applied UPPER(), REVERSE(), and SUBSTRING() functions to manipulate movie titles.
  • Wildcard Search: Used COUNT(*) ... WHERE Title LIKE '%G%' to count records containing the letter 'G'.

Next Steps & Career Advice

  • Upcoming Session: The next class will feature a live mock interview with a student, showing that everything taught in the course is directly relevant to real interview questions.
  • Focus Areas: The instructor advises students to focus on SQL, PowerBI, Tableau, SSIS, and SSRS for a data analyst role. He plans to add database administration (DBA) and Azure Data Factory courses.
  • Goal: To produce "competent, sound developers" who understand constructs and can code effectively. For those expanding their toolkit, the Master Tableau: Comprehensive Guide to Data Visualization & Dashboards offers a deep dive into another critical visualization tool.

The instructor also reveals career-building insights that go beyond technical skills: Lifting the Veil Career Paths: SQL Training & Job Stacking Strategy Revealed details how to leverage SQL expertise for multiple income streams. Additionally, complementing PowerBI skills with data preparation in Excel can be invaluable, explore Master Excel for Data Analysis: From Basics to Interactive Dashboards for a broader analytics foundation.

Keep this summary

Save it to LunaNotes and it becomes a real note in your library — editable, searchable, and ready to turn into flashcards or a diagram. Free to start.

Save to LunaNotes

Or summarise for another video.

This summary and transcript were automatically generated using AI with the Free YouTube Transcript Summary Tool by LunaNotes.

Related summaries

Lifting the Veil Career Paths: SQL Training & Job Stacking Strategy Revealed

Lifting the Veil Career Paths: SQL Training & Job Stacking Strategy Revealed

This video reveals the new Lifting the Veil IT Academy platform, featuring structured career paths (Data Analyst, Data Engineer, AI Engineer, etc.) and job stacking strategies. The instructor discusses the TSQL-based curriculum, resume-building labs, industry secrets about certification cheating in India, and explains database normalization (1NF, 2NF, 3NF) plus the difference between star and snowflake schemas.

Master SQL: Comprehensive Guide to Advanced Data Analytics and Optimization

Master SQL: Comprehensive Guide to Advanced Data Analytics and Optimization

Explore an extensive SQL course covering fundamentals to advanced topics including data warehousing, analytics, complex querying, performance tuning, and AI-powered coding assistance. Learn practical techniques, real-world project workflows, and best practices to excel in data engineering and analysis using SQL.

SQL Job Interview Prep: What Companies Really Ask (Watch Real Calls)

SQL Job Interview Prep: What Companies Really Ask (Watch Real Calls)

Watch real SQL job interview calls to see exactly what questions companies ask and how candidates answer (and sometimes struggle). The instructor breaks down each interview question, from T-SQL constructs and indexes to SSIS and temp tables, revealing exactly what you need to know to get hired as a data professional.

Comprehensive Databricks Boot Camp: From Basics to AI Integration

Comprehensive Databricks Boot Camp: From Basics to AI Integration

Join 2,600+ learners in this free live Databricks boot camp led by expert Baron, who brings 17 years of data engineering experience including leading projects at Mercedes-Benz. This two-day session unveils Databricks fundamentals, its role in modern big data analytics, and hands-on guidance for data analysts and engineers to leverage Databricks, SQL, and AI-powered data exploration effectively.

Master Tableau: Comprehensive Guide to Data Visualization & Dashboards

Master Tableau: Comprehensive Guide to Data Visualization & Dashboards

This extensive Tableau course covers everything from basics to advanced topics, including data modeling, calculations, chart types, dashboards, and real-world project implementation. Learn to create dynamic, interactive visualizations and dashboards with over 60 functions and 63 chart types, optimized for business intelligence and data analysis.

Found this summary useful?

Take it with you. One click puts it in your own LunaNotes library.

Save to LunaNotes

Start taking better notes today with LunaNotes