
The MINUS operator in SQL is used to remove duplicates from the result-set obtained by the second SELECT query from the result-set obtained by the first SELECT query and then return the filtered results from the first. The UNION operator combines and returns the result-set retrieved by two or more SELECT statements. What are UNION, MINUS and INTERSECT commands? The only difference between clustered and non-clustered indexes is that the database manager attempts to keep the data in the database in the same order as the corresponding keys appear in the clustered index.Ĭlustering indexes can improve the performance of most query operations because they provide a linear-access path to data stored in the database.Ģ1. This is why only one clustered index can exist in a given table, whereas, multiple non-clustered indexes can exist in the table. Instead, non-unique indexes are used solely to improve query performance by maintaining a sorted order of data values that are used frequently.Ĭlustered indexes are indexes whose order of the rows in the database corresponds to the order of the rows in the index. Non-unique indexes, on the other hand, are not used to enforce constraints on the tables with which they are associated. Once a unique index has been defined for a table, uniqueness is enforced whenever keys are added or changed within the index. Unique indexes are indexes that help maintain data integrity by ensuring that no two rows of data in a table have identical key values. There are different types of indexes that can be created for different purposes: CREATE INDEX index_name /* Create Index */ ON table_name (column_1, column_2) It enhances the speed of operations accessing data from a database table at the cost of additional writes and memory to maintain the index data structure. What is an Index? Explain its different types.Ī database index is a data structure that provides a quick lookup of data in a column or columns of a table. In the end, multiple-choice questions are provided to test your understanding.ġ4. We've divided this article into the following sections: It also covers practice problems to help you understand the basic concepts of SQL. Each question comes with a perfectly written answer inline, saving your interview preparation time. Here, you will find a collection of real-world Interview questions asked in companies like Google, Oracle, Amazon, and Microsoft, etc. This guide will help you to brush up on your SQL skills, regain your confidence and be job-ready! Differentiate between commit and checkpoint.Īre you preparing for your SQL developer interview?
#Redshift alter table column type full
Does PostgreSQL support full text search? How will you take backup of the database in PostgreSQL? How do you perform case-insensitive searches using regular expressions in PostgreSQL? What is the main disadvantage of deleting data from an existing table using the DROP TABLE command?

What can you tell about WAL (Write Ahead Logging)? How do you check the rows affected as part of previous transactions? What do you understand by command enable-debug? What do you understand by multi-version concurrency control? Can you explain the architecture of PostgreSQL? What are ACID properties? Is PostgreSQL compliant with ACID? How can you delete a database in PostgreSQL? How can you get a list of all databases in PostgreSQL? What is the capacity of a table in PostgreSQL?

What is the importance of the TRUNCATE statement? What are partitioned tables called in PostgreSQL? How can we start, restart and stop the PostgreSQL server? What is the command used for creating a database in PostgreSQL? How will you change the datatype of a column?
#Redshift alter table column type how to
How to create empty tables with the same structure as another table? What is Collation? What are the different types of Collation Sensitivity? What are the differences between OLTP and OLAP?

What is User-defined function? What are its various types? What is the difference between DELETE and TRUNCATE statements? What is the difference between DROP and TRUNCATE statements?

What are the TRUNCATE, DELETE and DROP statements? What are the various forms of Normalization? List the different types of relationships in SQL. What are some common clauses used with SELECT query in SQL? What is the difference between Clustered and Non-clustered index? What is an Index? Explain its different types. What is a Join? List its different types. What is the difference between SQL and MySQL? What is RDBMS? How is it different from DBMS?
