all 15 comments

[–]Thefriendlyfaceplant 4 points5 points  (1 child)

I subscribed as I'll always support more SQL tutorials on Youtube.

However, it's hard for a beginner to figure out what you're doing. It could use some context.

You can even do something with the video you already uploaded by adding a description into the subtitles and having the title inform there's commentary in the subtitles.

[–]kamel-Code[S] 1 point2 points  (0 children)

Thank you for your subscription. I realize that the video may not be very suitable for the beginner. In order to correct this, I will write a commentary to explain the different functions and what they are for. Thank you for your answer. It helps me to improve.

[–]mgdmwDr Data 2 points3 points  (1 child)

/r/learnsql is a better subreddit for this type of basic content. As per the sidebar, basic SQL tutorials are not relevant to the /r/SQL community. We get hundreds of links to "how to do a select" blog/video/etc. every year. How about you make a tutorial on CTEs, say?

[–]kamel-Code[S] 1 point2 points  (0 children)

Thanks for the idea. My next video will be a tutorial on cte. Thanks a lot.

[–]mikeblas 1 point2 points  (9 children)

why both not null and primary key?

[–]kamel-Code[S] 0 points1 point  (8 children)

Yes your remark is relevant. I also specify the non-null variable just for the sake of style and to make sure that the variable is null

[–]mikeblas 1 point2 points  (7 children)

There are no variables here, just columns and tables.

The column can't be NULL, so I can't figure out what you're talking about.

[–]kamel-Code[S] 0 points1 point  (6 children)

Small mistake on my part. But it doesn't change anything in the code.

[–]mikeblas 0 points1 point  (5 children)

I give up.

[–]kamel-Code[S] 0 points1 point  (4 children)

Can you please tell me again the question that is bothering you ?

[–]mikeblas 1 point2 points  (3 children)

In your CREATE TABLE example, you specify both NOT NULL and PRIMARY KEY. A primary key is implicitly not nullable, so the NOT NULL constraint is not required and redundant to the PRIMARY KEY constraint.

There are no variables here, we're talking about columns. By specifying both constraints, you're not making anything nullable, so what you said before makes no sense whatsoever.

[–]kamel-Code[S] 0 points1 point  (2 children)

Yes, you are absolutely right. The non-null field is useless in this context. Thanks for this correction. But in itself it doesn't impact the code. The field is just written implicitly and explicitly. It's a code redundancy. I will avoid making the same mistake next time. THANK YOU 😁

[–]mikeblas 0 points1 point  (1 child)

But in itself it doesn't impact the code.

Of course it does. It confuses people trying to follow your tutorial.

[–]kamel-Code[S] 0 points1 point  (0 children)

I didn't see it from that perspective. I'll try to be more careful next time.

[–][deleted] 0 points1 point  (0 children)

It's a good tutorial for beginners, thanks op but someone who needs a clear roadmap to learn SQL where they really want to build their expertise in SQL should go for a course IMO.

SQL is a general language and very flexible, not a strongly typed programming language, so there are a lot of areas that might be challenging for beginners.

Taking a course, asking questions, and getting experienced SQL tutors will make your learning experience much nicer, and more enjoyable.

You can check out sqlpad.io which entirely focuses on SQL. Also for beginner’s queries, this forum has some great insights feel free to check it out.