Ryan McBeth
Ryan McBeth
@RyanMcBethProgramming·1.1M subscribers·1.8K videos

SQL Interview Questions for C# Developers

Posted

December 16, 2021

Views

1,847

Likes

96

Comments

12

Engagement

5.85%

Search the Record

Indexed

Every word spoken in this episode is indexed. Type any phrase to jump straight to the moment it was said.

Type any word or phrase that may have been spoken. Click a result to seek the player to that exact moment.

Try a name, a topic, or a quoted line

YouTube Description

as posted by the channel

The code to generate the SQL in the video is available here:

ryanmcbeth.com

If you know C# and Entity Framework, you should also know how to perform basic SQL queries.

Odds are if you are applying for a full stack developer job, 10% to 20% of your interview questions will be about SQL.

Here is what you should know:

A database schema is a visual representation of data in a database.

Normalizing data is the process of organizing data and establishing relationships.

TABLEs are the basic building blocks of of a database and are where all of your data is stored.

A SELECT statement reads data from a TABLE.

The WHERE clause helps refine the data.

The difference between LIKE and EQUALS (=) is that LIKE can use wildcards.

The JOIN command can join two tables on a pivot value. There are many different kinds of JOINs but the most common is the INNER JOIN.

A good way of remembering the syntax for an inner join is the mnemonic

SPECIAL FORCES

IN JAWBREAKER

OAKLYS

Which relates to:

SELECT * FROM Table_A

INNER JOIN Table_B

ON Table_A.ID = Table_B.ID

These JOINs can be fed into VIEWs, which is a great way of allowing people to view records while restricting certain columns.

STORED PROCEDURES are a way of storing scripts that will be run frequently. Stored procedures are extremely fast but care should be taken to prevent business logic from seeping into the procedure.

SCALAR FUNCTIONS are essentially stored procedures that always return a value but they cannot perform environmental changes like STORED PROCEDURES can.

TRIGGERS are stored procedures that sit on a TABLE and are executed when an action is performed on a TABLE.

An INDEX comes in CLUSTERED and NON-CLUSTERED flavors. A database can only have one clustered index, which is usually the primary key of a database. A NON-CLUSTERED index creates a separate index on the column of a table. You can have multiple NON-CLUSTERED indexes. Both speed up table access when searching and sorting.

SQL PROFILER can be used to peek into the database and see what is running in real time.

Finally, a SQL injection attack is when an entity attempts the bypass database security by placing commands inside of form fields. This can be overcome by using good validation, parameterized queries, and stored procedures.

Guests & Subjects Covered

Entity FrameworkSQL HereA SELECTTABLE The WHEREThe JOININNER JOIN ATableBID These JOINsSTORED PROCEDURES

Sentinel Indexing in Progress

Metadata and chapters are available. Claim extraction for this episode is pending.

All video content is delivered via YouTube embedded players in accordance with the YouTube Terms of Service. Sentinel provides research tools that promote discovery and accountability across political media.

SQL Interview Questions for C# Developers · Ryan McBeth · Sentinel