Top 50 SQL Interview Questions and Answers | SQL INTERVIEW | interview questions sql Part 1

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 99

  • @learnwithapk
    @learnwithapk  4 роки тому

    Master SQL and Learn relational database theory, queries, & other components of Oracle SQL
    SQL From Beginner to Pro - bit.ly/2XqXgzE
    Master SQL in 90 Minutes - bit.ly/2zlbuda

    Apply Coupon “LRN20" to get flat 20% off

  • @365DataScience
    @365DataScience 5 років тому +46

    Here are some frequently encountered SQL interview question, and my top tips to answering them:
    1. What is SQL?
    SQL, Structured Query Language, is a programming language designed for working with databases. Some people, however, argue that it is not exactly a programming language since it has not been created with the notion of using features of procedural languages, such as conditional statements or “for” loops. These people insist on calling SQL a coding language because it is only about executing commands for querying, creating, inserting, updating, and deleting data in a database. Nonetheless, the most important thing is to know what the domain of SQL is.
    2. What is a Database? What is a DBMS?
    A database is data stored on a computer and ordered in a way that makes it easy to access and manipulate. a database management system - DBMS is the software tool that allows users to interact with the data stored in the database.
    You could conclude by explaining there are two types of database management systems - relational and non-relational. SQL is a language, designed only for working with relational DBMSs.
    Such questions are usually asked in the beginning of the interview so that you can start preparing for the difficult ones.
    3. What is the difference between DDL, DML, DCL, and TCL?
    First of all, let’s explain what there acronyms stand for:
    “L” stands for “Language” in all of them. And this must help you remember that these are the four categories in which the SQL commands have been separated into.
    DDL stands for Data Definition Language and includes the commands that allow you to CREATE, DROP, ALTER, and TRUNCATE data structures. DML involves commands for manipulating information. It actually means “Data Manipulation Language”, and gives the possibility to SELECT, INSERT, UPDATE, and DELETE data. it is this part of the language you will most use at work, if you are using SQL in the field of data science or business intelligence.
    DCL, Data Control Language, consists of commands that are usually used by database administrators. This one allows programmers to GRANT and REVOKE rights defining how much control you can have over the information in the database.
    Similarly, TCL, which is the Transaction Control Language, also includes the commands applied by database administrators. These command ensures that the danger of suffering from data loss is minimal.
    4. What is the point of using a foreign key constraint?
    The foreign key constraint comprises a set of rules, or limits, that will ensure that the values in the child and parent tables match. Theoretically, the foreign key constraint will maintain the referential integrity within the database.
    5. Define and provide an example of using an inner join.
    Obviously, you must be aware that joins are one of the most frequently used tools in SQL, regardless of your job role. Particularly if you are working in the sphere of business intelligence, your work will be centred around understanding SQL joins in depth.
    So, an SQL join is a tool that allows you to construct a relationship between objects in your database. Consequently, a join shows a result set containing fields derived from two or more tables.
    For instance, assume that in one table you have data about the customer ID and fields related to the sales a customer has made, and in the other, you have data about the customer ID and their private information, such as first and last name and email address. Therefore, an inner join allows you to obtain an output containing information from both tables only for the customer IDs found in the two tables that match. Provided that you set the customer ID field to be a matching column, of course.
    6. What is the difference between MySQL and PostgreSQL? How about between PL/SQL and SQL?
    The interviewers ask these questions as they want to find out how much you are acquainted with the fact that SQL has a few versions, each carrying specific features.
    You could say that MySQL and PostgreSQL are just two versions of the Structured Query Language. Since you’ve just been asked about joins, you could mention that PostgreSQL supports outer joins, while MySQL doesn’t - you’ll need to use UNION or UNION ALL to emulate an outer join in MySQL. This way you could even impress the interviewers with extra knowledge in this subject.
    PL/SQL is not a version of SQL, however, and that’s the tricky part of the question. PL/SQL is a complete procedural programming language and its scope of application is different. It is not strictly related to relational databases.
    7. What is an SQL View?
    Your potential future employers may want to give a toned-down SQL interview question. That’s why they might ask a general question.
    A view is a virtual table whose contents are obtained from an existing table or tables, called base tables. The retrieval happens through an SQL statement, incorporated into the view. In other words, you can think of a view object as a view into the base table. The view itself does not contain any real data; the data is electronically stored in the base table. The view simply shows the data contained in the base table.
    Source: bit.ly/2Fe6x4Q
    Good luck!
    Best,
    365 Data Science
    Online educational career website
    365datascience.com/

  • @hafizawaissadaqat9335
    @hafizawaissadaqat9335 4 роки тому +2

    Brilliant Work Sir...
    Learn a lot
    Highly Appreciated !!

  • @peterpatel3581
    @peterpatel3581 5 років тому

    I completely agree with Malike Eyakwe !!! It says in India When Elefant walking on the street wild dogs are barking, Elefant even doesn't care and keep walking !!! Keep it up

  • @noof4157
    @noof4157 5 років тому +1

    I have an internship interview and I don't know from where to start my reserches, your video is a life saver!!! Thank you man

  • @nidhikamble432
    @nidhikamble432 3 роки тому

    Thanks ❤️

  • @thebeetrootchannel
    @thebeetrootchannel 6 років тому +4

    It's really informative sir! I am truly following the videos on this channel also it's inspired me to open UA-cam channel of my own .. thanks for inspiring

    • @learnwithapk
      @learnwithapk  6 років тому

      all the best ....

    • @vamshikrishna-dk5jf
      @vamshikrishna-dk5jf 4 роки тому

      @@learnwithapk could you please send the pdf material to krish.draksha@gmail.com

  • @Crazy4DB
    @Crazy4DB 5 років тому +1

    Appreciable efforts. We may get introduced with each other, also a corporate trainer in Oracle

  • @wishUonepluseight
    @wishUonepluseight 5 років тому +5

    would have been a better video if real/live example demos were provided.

  • @mohammedrahman4861
    @mohammedrahman4861 5 років тому +2

    Great work dada. It is very helpfull

  • @renukaselvaraj8921
    @renukaselvaraj8921 5 років тому +1

    Inner join returns a row when there is a match in both the tables.

    • @cool_be_cool
      @cool_be_cool 4 роки тому

      Hiiii

    • @tanmayeej4108
      @tanmayeej4108 4 роки тому

      too jobless to send hi to everyone in the comments. lol🤣🤣🤣

  • @redudire1236
    @redudire1236 5 років тому

    Thanks so much it's very helpful video

  • @jeyhunaliyev1765
    @jeyhunaliyev1765 5 років тому +1

    GREAT

  • @krupavaram5043
    @krupavaram5043 6 років тому +2

    Very clear n good explanation Sir..tnq

  • @deepika2637
    @deepika2637 5 років тому

    this is way better than other tutorials

  • @manishpatil8284
    @manishpatil8284 4 роки тому

    Sir these Ans are Common for SQL SERVER?? If these questions Asks in MS SQL SERVER???

  • @usbrandedcosmetics5693
    @usbrandedcosmetics5693 5 років тому

    very good info

  • @parampreetsingh944
    @parampreetsingh944 5 років тому

    Good Job

  • @TheRandomPeoples
    @TheRandomPeoples 5 років тому +1

    Thank you so much subscribed

  • @calvinfoo
    @calvinfoo 5 років тому +3

    Come on, you don't ask such questions in interviews.
    Just throw him a table and ask him to write the sql to retrieve what you wanted.

  • @aakulalavanya6824
    @aakulalavanya6824 6 років тому +2

    tq sir...ur explanation is very good

  • @viku22ful
    @viku22ful 5 років тому

    Good..

  • @Lala-og4rj
    @Lala-og4rj 6 років тому +2

    thanks

  • @ga7853
    @ga7853 5 років тому

    The sound is terrible, but thanks for having the questions and answers written that make up for the bad sound.. Regards

  • @harshvardhandewari8147
    @harshvardhandewari8147 6 років тому +1

    thank YOU

  • @riyapatel5314
    @riyapatel5314 7 років тому +2

    plzz could you make video of pl/sql and dbms more information (details)

  • @iamnik159
    @iamnik159 5 років тому

    Nice. Very helpful bro..

  • @balasahebpaul6013
    @balasahebpaul6013 6 років тому +3

    it was very helpful for interview

  • @balasahebpaul6013
    @balasahebpaul6013 6 років тому +3

    if possible try to give us that questions list which are in videos, in the video description

    • @learnwithapk
      @learnwithapk  6 років тому +4

      its in the description bala...

  • @shivanandadodamani8990
    @shivanandadodamani8990 5 років тому

    Thanks sir, your explaination is very good,, i think little more detailed explaination is required

  • @wakolatamiru8721
    @wakolatamiru8721 5 років тому

    SQL language is avast Technology than MS Access DBA

  • @ashutoshpatel9794
    @ashutoshpatel9794 7 років тому +2

    thanks alot

  • @ALLCPL
    @ALLCPL 6 років тому

    Good

  • @shivakumar-zb8ii
    @shivakumar-zb8ii 6 років тому +1

    nice add:a5 man,boy,mlritm

  • @hannahshiny4735
    @hannahshiny4735 6 років тому +2

    extreamly good

  • @robinmitrani25
    @robinmitrani25 7 років тому +5

    wah wah wah!!!

  • @destroya3303
    @destroya3303 6 років тому

    I'm going to apply for a job and they will ask me "what is a database"? Seriously I don't think so

    • @aaddiis45021
      @aaddiis45021 6 років тому

      They can depends on your job plus on mood of interviewer

  • @anjankgoswami
    @anjankgoswami 5 років тому

    Should give examples.।।

  • @krishnakanthcake
    @krishnakanthcake 7 років тому

    thank you very much .

  • @Ganeshay-996
    @Ganeshay-996 7 років тому

    plz could you make vdo of pl/sql ans sql more details

  • @TheMiteshranka88
    @TheMiteshranka88 6 років тому

    Any body also think vedio subject should has data warehouse in it

  • @burhansheikh8460
    @burhansheikh8460 6 років тому

    I want know that difference between data and database

    • @komalanarpala7964
      @komalanarpala7964 5 років тому

      This is what I know...hope it helps you..Data is a processed information.information and data are different.information contains raw . It becomes useful data when it gets processed.database is used to store the data

    • @venkateshv626
      @venkateshv626 5 років тому

      Data constitutes text document word, pdf etc, multimedia files and other types of electronic information that can be stored in devices like drives, and also in cloud which is a network of large storage servers. Whereas database is not necessarily a storage area, it much like an index of a big textbook, it can store some data, but it mainly consits of metadata which consist of details related to data. With the help of metadata we can conveniently manage the data by adding, updating, retrieving etc.

  • @alschwartz8732
    @alschwartz8732 6 років тому +8

    this would be so much better if in english

    • @shaon_rahman_khan
      @shaon_rahman_khan 6 років тому +3

      It IS in English.

    • @krakow4775
      @krakow4775 6 років тому +1

      @@shaon_rahman_khan wahahahahahah

    • @alexnatic7101
      @alexnatic7101 5 років тому

      Lmao

    • @missramz207
      @missramz207 5 років тому

      People like you used to annoy the sh#t out of me when i used to work in tech support.

  • @adityakar9740
    @adityakar9740 6 років тому +1

    Kya baat kya baat kya baat😍🙄

  • @singarimanikanta6838
    @singarimanikanta6838 7 років тому

    this only on sql.plz give interview wise topic.

  • @RahulKumar-vr4cm
    @RahulKumar-vr4cm 6 років тому +1

    SQL plsql.

  • @shibajyoti100
    @shibajyoti100 6 років тому

    Life is a cup cake seems like ahhahaa

  • @tvenkateshkumar1286
    @tvenkateshkumar1286 6 років тому

    sir are u that chemistry sir

  • @venkatakrishnudu6863
    @venkatakrishnudu6863 6 років тому +1

    Pls send me PDF file

    • @venkatakrishnudu6863
      @venkatakrishnudu6863 6 років тому

      vemarapuyadava@gmail.com

    • @ArmanAli-dk6oc
      @ArmanAli-dk6oc 6 років тому

      Send me pdf on email
      Devildesire73@gmail.com

    • @parishigujarathi9568
      @parishigujarathi9568 6 років тому

      send me the pdf on the mail. id: parishigujarathi@gmail.com

    • @vayu122
      @vayu122 6 років тому

      search in guru 99 top 50 interview questions

    • @krs1913
      @krs1913 6 років тому

      Please send me the pdf@ krs1913@gmail.com

  • @renusaraswat9015
    @renusaraswat9015 6 років тому

    How split the data and display the output in different different columns.
    For ex- Hina Bhatt is a name in name column we want to show Hina in a different column and Bhatt in different column

    • @sonuhemke3518
      @sonuhemke3518 6 років тому

      Use the split function

    • @smallclips4164
      @smallclips4164 6 років тому

      Sonu Hemke which split function ? String_split was introduced from 2016 onwards .. before that you have to write a custom function.

    • @smallclips4164
      @smallclips4164 6 років тому

      From sql server 2016 onwards you can use string_split
      Else
      You have to write your own sql
      Ex:
      Select LEFT('hina bhatt', CHARINDEX(',', 'hina bhatt') - 1)
      Similarly for last part use substring