SQL Interview Questions with Answers
1. How to change a table name in SQL?
This is the command to change a table name in SQL:
ALTER TABLE table_name
RENAME TO new_table_name;
We will start off by giving the keywords ALTER TABLE, then we will follow it up by giving the original name of the table, after that, we will give in the keywords RENAME TO and finally, we will give the new table name.
2. How to use LIKE in SQL?
The LIKE operator checks if an attribute value matches a given string pattern. Here is an example of LIKE operator
SELECT * FROM employees WHERE first_name like ‘Steven’;
With this command, we will be able to extract all the records where the first name is like “Steven”.
3. If we drop a table, does it also drop related objects like constraints, indexes, columns, default, views and sorted procedures?
Yes, SQL server drops all related objects, which exists inside a table like constraints, indexes, columns, defaults etc. But dropping a table will not drop views and sorted procedures as they exist outside the table.
4. Explain SQL Constraints.
SQL Constraints are used to specify the rules of data type in a table. They can be specified while creating and altering the table. The following are the constraints in SQL: NOT NULL CHECK DEFAULT UNIQUE PRIMARY KEY FOREIGN KEY
React ❤️ for more
1. How to change a table name in SQL?
This is the command to change a table name in SQL:
ALTER TABLE table_name
RENAME TO new_table_name;
We will start off by giving the keywords ALTER TABLE, then we will follow it up by giving the original name of the table, after that, we will give in the keywords RENAME TO and finally, we will give the new table name.
2. How to use LIKE in SQL?
The LIKE operator checks if an attribute value matches a given string pattern. Here is an example of LIKE operator
SELECT * FROM employees WHERE first_name like ‘Steven’;
With this command, we will be able to extract all the records where the first name is like “Steven”.
3. If we drop a table, does it also drop related objects like constraints, indexes, columns, default, views and sorted procedures?
Yes, SQL server drops all related objects, which exists inside a table like constraints, indexes, columns, defaults etc. But dropping a table will not drop views and sorted procedures as they exist outside the table.
4. Explain SQL Constraints.
SQL Constraints are used to specify the rules of data type in a table. They can be specified while creating and altering the table. The following are the constraints in SQL: NOT NULL CHECK DEFAULT UNIQUE PRIMARY KEY FOREIGN KEY
React ❤️ for more
❤4
Join our WhatsApp channel for free learning lessons
👇👇
https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L
👇👇
https://whatsapp.com/channel/0029VaiM08SDuMRaGKd9Wv0L
WhatsApp.com
Python Programming | WhatsApp Channel
Python Programming WhatsApp Channel. Perfect channel to learn Python Programming 👨💻👩💻
- ✅ Free Courses
- ✅ Coding Projects
- ✅ Important Pdfs
- ✅ Artificial Intelligence Bootcamps
- ✅ Data Science Notes
- ✅ Latest Tech & AI Trends
For promotions, contact…
- ✅ Free Courses
- ✅ Coding Projects
- ✅ Important Pdfs
- ✅ Artificial Intelligence Bootcamps
- ✅ Data Science Notes
- ✅ Latest Tech & AI Trends
For promotions, contact…
❤1
5 beginner-friendly web development projects that can help you improve your skills
1. Personal Website or Portfolio:
- Create a website that showcases your resume, projects, and skills.
- Practice HTML and CSS to design the layout and style it.
2. To-Do List Application:
- Build a simple to-do list app using HTML, CSS, and JavaScript.
- Learn about DOM manipulation, event handling, and local storage.
3. Weather App:
- Develop a web app that fetches and displays weather information for a user's location.
- Use HTML, CSS, JavaScript, and APIs like OpenWeatherMap.
4. Blog or Blogging Platform:
- Create a basic blog or expand it into a blogging platform.
- Learn about databases (e.g., SQLite), server-side scripting (e.g., Node.js), and user authentication.
5. E-commerce Product Page:
- Design a product page for an e-commerce site.
- Practice building product grids, adding product details, and implementing a shopping cart feature.
React ❤️ For More
1. Personal Website or Portfolio:
- Create a website that showcases your resume, projects, and skills.
- Practice HTML and CSS to design the layout and style it.
2. To-Do List Application:
- Build a simple to-do list app using HTML, CSS, and JavaScript.
- Learn about DOM manipulation, event handling, and local storage.
3. Weather App:
- Develop a web app that fetches and displays weather information for a user's location.
- Use HTML, CSS, JavaScript, and APIs like OpenWeatherMap.
4. Blog or Blogging Platform:
- Create a basic blog or expand it into a blogging platform.
- Learn about databases (e.g., SQLite), server-side scripting (e.g., Node.js), and user authentication.
5. E-commerce Product Page:
- Design a product page for an e-commerce site.
- Practice building product grids, adding product details, and implementing a shopping cart feature.
React ❤️ For More
❤2
9 full-stack project ideas to build your portfolio:
🛍️ Online Store — product listings, cart, checkout, and payment integration
🗓️ Event Booking App — users can browse, book, and manage events
📚 Learning Platform — courses, quizzes, progress tracking
🏥 Appointment Scheduler — book and manage appointments with calendar UI
✍️ Blogging System — post creation, comments, likes, and user roles
💼 Job Board — post and search jobs, apply with resumes
🏠 Real Estate Listings — search, filter, and view property details
💬 Chat App — real-time messaging with sockets or Firebase
📊 Admin Dashboard — charts, user data, and analytics in one place
Like this post if you want me to cover the skills needed to build such projects ❤️
Web Development Resources: https://whatsapp.com/channel/0029VaiSdWu4NVis9yNEE72z
Like it if you need a complete tutorial on all these projects! 👍❤️
🛍️ Online Store — product listings, cart, checkout, and payment integration
🗓️ Event Booking App — users can browse, book, and manage events
📚 Learning Platform — courses, quizzes, progress tracking
🏥 Appointment Scheduler — book and manage appointments with calendar UI
✍️ Blogging System — post creation, comments, likes, and user roles
💼 Job Board — post and search jobs, apply with resumes
🏠 Real Estate Listings — search, filter, and view property details
💬 Chat App — real-time messaging with sockets or Firebase
📊 Admin Dashboard — charts, user data, and analytics in one place
Like this post if you want me to cover the skills needed to build such projects ❤️
Web Development Resources: https://whatsapp.com/channel/0029VaiSdWu4NVis9yNEE72z
Like it if you need a complete tutorial on all these projects! 👍❤️
❤2👍1
👆 40 Project Ideas for Web Developers
Coding Projects on WhatsApp: https://whatsapp.com/channel/0029VazkxJ62UPB7OQhBE502
Coding Projects on WhatsApp: https://whatsapp.com/channel/0029VazkxJ62UPB7OQhBE502
❤2👍2
Since many of you were asking me to send Data Science Session
📌So we have come with a session for you!! 👨🏻💻 👩🏻💻
This will help you to speed up your job hunting process 💪
Register here
👇👇
https://go.acciojob.com/RYFvdU
Only limited free slots are available so Register Now
📌So we have come with a session for you!! 👨🏻💻 👩🏻💻
This will help you to speed up your job hunting process 💪
Register here
👇👇
https://go.acciojob.com/RYFvdU
Only limited free slots are available so Register Now
❤2👏1
Beginner’s Roadmap to Learn Data Structures & Algorithms
1. Foundations: Start with the basics of programming and mathematical concepts to build a strong foundation.
2. Data Structure: Dive into essential data structures like arrays, linked lists, stacks, and queues to organise and store data efficiently.
3. Searching & Sorting: Learn various search and sort techniques to optimise data retrieval and organisation.
4. Trees & Graphs: Understand the concepts of binary trees and graph representation to tackle complex hierarchical data.
5. Recursion: Grasp the principles of recursion and how to implement recursive algorithms for problem-solving.
6. Advanced Data Structures: Explore advanced structures like hashing, heaps, and hash maps to enhance data manipulation.
7. Algorithms: Master algorithms such as greedy, divide and conquer, and dynamic programming to solve intricate problems.
8. Advanced Topics: Delve into backtracking, string algorithms, and bit manipulation for a deeper understanding.
9. Problem Solving: Practice on coding platforms like LeetCode to sharpen your skills and solve real-world algorithmic challenges.
10. Projects & Portfolio: Build real-world projects and showcase your skills on GitHub to create an impressive portfolio.
Best DSA RESOURCES: https://topmate.io/coding/886874
All the best 👍👍
1. Foundations: Start with the basics of programming and mathematical concepts to build a strong foundation.
2. Data Structure: Dive into essential data structures like arrays, linked lists, stacks, and queues to organise and store data efficiently.
3. Searching & Sorting: Learn various search and sort techniques to optimise data retrieval and organisation.
4. Trees & Graphs: Understand the concepts of binary trees and graph representation to tackle complex hierarchical data.
5. Recursion: Grasp the principles of recursion and how to implement recursive algorithms for problem-solving.
6. Advanced Data Structures: Explore advanced structures like hashing, heaps, and hash maps to enhance data manipulation.
7. Algorithms: Master algorithms such as greedy, divide and conquer, and dynamic programming to solve intricate problems.
8. Advanced Topics: Delve into backtracking, string algorithms, and bit manipulation for a deeper understanding.
9. Problem Solving: Practice on coding platforms like LeetCode to sharpen your skills and solve real-world algorithmic challenges.
10. Projects & Portfolio: Build real-world projects and showcase your skills on GitHub to create an impressive portfolio.
Best DSA RESOURCES: https://topmate.io/coding/886874
All the best 👍👍
❤1
Which of the following is *not* a core concept of OOP?
Anonymous Quiz
4%
a) Inheritance
90%
b) Compilation
4%
c) Encapsulation
2%
d) Polymorphism
❤3
What is encapsulation in OOP?
Anonymous Quiz
5%
a) Reusing existing code
83%
b) Binding data and methods together & hiding internal details
6%
c) Accessing base class methods
7%
d) Overriding methods in subclasses
❤1
Which keyword is used for inheritance in Java?
Anonymous Quiz
8%
a) implement
5%
b) derive
62%
c) extends
25%
d) inherits
❤1
What is polymorphism in OOP?
Anonymous Quiz
8%
a) Defining many classes
4%
b) Using many variables
75%
c) One function behaving differently in different classes
13%
d) Multiple constructors in one class
❤1