What operator tests column for the absence of data? Which command executes the contents of a specified file? RUN 7.
What are the w ildcards used for pattern matching? State true or false. True 9. True What are the privileges that can be granted on a table by a user to others?
Insert, update, delete, select, references, index, execut e, alter, all Which system tables contain information on privileges granted and privileges obtained? Which system table contains information on constraints on all the tables created? Both w ill result in deleting all the row s in the table EM P.
When a clustered index is created on a table, the data pages are arranged accordingly based on the clustered index key. There can only be one Clustered index on a table. In a Non-Clustered index, the leaf level pages do not contain data pages instead it contains pointers to the data pages. There can multiple non-clustered indexes on a single table. I would recommend reading this blog of mine which explains the differences between these 4 features.
What are the commands used in DCL? Where do you find the default Index fill factor and how to change it? Answer: The easiest way to find and change the default fill factor value is from Management Studio, right-click the SQL Server and choose properties. In the Server Properties, choose Database Settings, you should see the default fill factor value in the top section.
You can change to a desired value there and click OK to save the changes. What is Replication? Answer: Replication is a feature in SQL Server that helps us publish database objects and data and copy replicate it to one or more destinations. It is often considered as one of the High-Availability options. One of the advantages of Replication is that it can be configured on databases which are in simple recovery model. What the different components in Replication and what is their use?
The publisher is the data source of a publication. The distributor is responsible for distributing the database objects to one or more destinations. That is, in SQL Server , the Installation process itself installs on all of the nodes be it 2 nodes or 3 nodes. In or above this has changed, we would need to install separately on all the nodes.
List out some of the requirements to set up a SQL Server failover cluster? Due to some maintenance being done, the SQL Server on a failover cluster needs to be brought down. How do you bring the SQL Server down? If you have worked only some version be honest in saying that, remember, no one would be working on all versions, it varies from individual to individual. The unique key constraints are used to enforce entity integrity as the primary key constraints.
A foreign key in one table points to a primary key in another table. Foreign keys prevent actions that would leave rows with foreign key values when there are no primary keys with that value. The foreign key constraints are used to enforce referential integrity. Can a stored procedure call itself or recursive stored procedure? How many levels SP nesting is possible? Answer: Yes. Because Transact-SQL supports recursion, you can write stored procedures that call themselves.
Recursion can be defined as a method of problem-solving wherein the solution is arrived at by repetitively applying it to subsets of the problem. A common application of recursive logic is to perform numeric computations that lend themselves to repetitive evaluation by the same processing steps. Stored procedures are nested when one stored procedure calls another or executes managed code by referencing a CLR routine, type, or aggregate.
You can nest stored procedures and managed code references up to 32 levels. Answer: In OLTP — online transaction processing systems relational database design use the discipline of data modeling and generally follow the Codd rules of data normalization in order to ensure absolute data integrity. Using these rules complex information is broken down into its most simple structures a table where all of the individual atomic level elements relate to each other and satisfy the normalization rules.
Answer: Yes, it is possible to have various configurations in a Replication environment. What is Transparent Data Encryption? On a Windows Server Active — Passive failover cluster, how do you find the node which is active? More on these Indexes later. What are the operating modes in which Database Mirroring runs? What is the difference between clustered and a non-clustered index? Answer: SQL constraints are the set of rules that impose some restriction while insertion, deletion or updation of data in the databases.
In SQL we have both column level as well as table level constraints which are applied at columns and tables respectively. Answer: DCL commands are used to create roles, grant permission and control access to the database objects. What is a Primary Key? Answer: A primary key is a column or a combination of columns which uniquely identifies a record in the database.
A primary key can only have unique and not NULL values and there can be only one primary key in a table. How to add code to the existing article Using Improve Article? Answer: According to First Normal Form, a column cannot have multiple values, each value in the columns must be atomic. What are scalar functions in SQL? Answer: Scalar functions are the functions that return a single value by processing a single value in SQL. They are used to extract a substring from a string by specifying the start and end index.
What is a coalesce function? Answer: Coalesce function is used to return the first, not NULL value out of the multiple values or expressions passed to the coalesce function as parameters. What are the different types of joins? Answer: Types of Joins are as follows:. What do you mean by Subquery?
Answer: Query within another query is called as Subquery. A subquery is called inner query which returns output that is to be used by another query. What is a Unique key? Answer : Uniquely identifies a single row in the table. Multiple values allowed per table. Null values allowed. Apart from this SQL Interview Questions blog, if you want to get trained from professionals on this technology, you can opt for a structured training from SVR!
What do you mean by data integrity? Answer: Data Integrity defines accuracy as well as the consistency of the data stored in a database.
It also defines integrity constraints to enforce business rules on the data when it is entered into an application or a database. Write a SQL query to display the current date? What is DBMS? Answer : Database Management System is a collection of programs that enables a user to store, retrieve, update and delete information from a database.
Answer : DDL commands are used to define or alter the structure of the database. What are Constraints? Answer: Constraints are used to specify the limit on the data type of the table.
It can be specified while creating or altering the table statement. Explain different types of index? Answer: There are three types of index namely: Unique Index: This index does not allow the field to have duplicate values if the column is unique indexed.
If a primary key is defined, a unique index can be applied automatically. Clustered Index: This index reorders the physical order of the table and searches based on the basis of key values. Each table can only have one clustered index. Non-Clustered Index: Non-Clustered Index does not alter the physical order of the table and maintains a logical order of the data. Each table can have many nonclustered indexes.
Explain different types of Normalization? Answer: There are many successive levels of normalization. These are called normal forms. Each consecutive normal form depends on the previous one. The first three normal forms are usually adequate. Third Normal Form 3NF — Dependent solely on the primary key and no other non-key supporting column value.
0コメント