SQL Basic Aptitude Questions and Answers - This section contains Aptitude Questions on SQL Basics - SQL Commands, syntaxes, examples, definitions etc. This is the database questions and answers section on "Introduction to SQL" with download Database Introduction to SQL quiz questions with answers as PDF. Technical Aptitude questions with answers PDF download for "SQL". This download file includes SQL query programs and program error codes. Download this.

Sql Aptitude Questions And Answers Pdf

Language:English, Portuguese, Dutch
Published (Last):16.06.2016
ePub File Size:30.55 MB
PDF File Size:17.16 MB
Distribution:Free* [*Registration needed]
Uploaded by: STAN

SQL MCQ Questions: Here you will get selected & important objective type MCQs on SQL SQL (Structured Query Language) quiz question bank in PDf format for APTITUDE TESTS - MENTAL ABILITY - SOLVED OBJECTIVE MCQ SETS. This SQL aptitude contains 28 questions with answers. We also attached the pdf file for the SQL aptitude Questions. Feel free to download the. RDBMS stands for Relational Database Management System. RDBMS store the data into the collection of tables, which is related by common.

What is Mutating Trigger?

SQL Objective Question and answer

Ans: Into a row level trigger based on a table trigger body cannot read data from same table and also we cannot perform DML operation on same table. If we are trying this oracle server returns mutating error oracle table is mutating. This error is called mutating error, and this trigger is called mutating trigger, and table is called mutating table. Mutating errors are not occurred in statement level trigger because through these statement level trigger when we are performing DML operations automatically data committed into the database, whereas in row level trigger when we are performing transaction data is not committed and also again we are reading this data from the same table then only mutating errors is occurred.

These are inserting, updating, deleting clauses. These clauses are used in statement, row-level trigger. These triggers are also called as trigger predicate clauses. Syntax: If inserting then stmts; else if updating then stmts; else if deleting then stmts; end if; Q What is Discard File?

Ans: This file extension is.

Discard file also stores reflected record based on when clause condition within control file. This condition must be satisfied into table tablename clause. Ans: Oracle 7. This command is used, ones the processing of large data is done. Explain the steps needed to Create the scheduled job?

Right click on jobs and choose Add New. A New Job window will come into view. Give an associated name for the same. An SQL job can comprise of one or supplementary schedules.

Sales Offer

It is basically the instance at which SQL job will jog itself. We can spell out returning schedules also. What are the different types of constraints? Constraints are the rules applied on data columns on table.

These are used to bound the type of data that can go into a table. This ensures the accuracy and consistency of the data. If there is any violation between the constraint and the data action, the action is aborted by the constraint.

It must be unique and not null. When are we going to use truncate and delete?

Sales Offer

Explain correlated query work? First, a row is processed in the outer doubt.

Then, for that exacting row, the subquery is executed — as a result for each row processed by the outer query, the subquery will also be processed. Salary and run. Read this insightful tutorial to learn usage of SQL Clauses. CTA 8. When is the Explicit Cursor Used? If the developer needs to perform the row by row operations for the result set containing more than one row, then he unambiguously declares a pointer with a name.

Find What is Wrong in this Query?

Name some commands that can be used to manipulate text in T-SQL code. For example, a command that obtains only a portion of the text or replace a text string, etc. The starting position is optional. LEN textData — Returns integer value of the length of the string, excluding trailing blanks. STUFF textData, start , length , insertTextData — Deletes a specified length of characters and inserts another set of characters at a specified starting point. What are the three ways that Dynamic SQL can be executed?

Writing a query with parameters. Using EXEC. Get a clear understanding of SQL in this riveting blog. In what version of SQL Server were synonyms released? How do synonyms work and explain its use cases? Synonyms were released with SQL Server Synonyms enable the reference of another object View, Table, Stored Procedure or Function potentially on a different server, database or schema in your environment.

In simple words, the original object that is referenced in the whole code is using a completely different underlying object, but no coding changes are necessary. Think of this as an alias as a means to simplify migrations and application testing without the need to make any dependent coding changes.

Synonyms can offer a great deal of value when converting underlying database objects without breaking front end or middle tier code. This could be useful during a re-architecture or upgrade project. If you are a SQL Developer, how can you delete duplicate records in a table with no primary key? If so, what are the commands? Yes, six commands are available to import data directly in the T-SQL language.

These commands include : BCP : The bulk copy bcp command of Microsoft SQL Server provides you with the ability to insert large numbers of records directly from the command line. In addition to being a great tool for command-line aficionados, bcp is a powerful tool for those seeking to insert data into a SQL Server database from within a batch file or other programmatic method.

Top 90 SQL Interview Questions and Answers (LATEST)

Typically linked servers are configured to enable the Database Engine to execute a Transact-SQL statement that includes tables in another instance of SQL Server, or another database product such as Oracle. What is the native system stored procedure to execute a command against all databases?

The alternative is to use a cursor to process specific commands against each database.

How do you maintain database integrity where deletions from one table will automatically cause deletions in another table? You can create a trigger that will automatically delete elements in the second table when elements from the first table are removed.

SQL Aptitude questions and answers PDF

What port does SQL server run on? Explain with an example? What are the risks of storing a hibernate-managed object in cache? How do you overcome the problems? The primary problem here is that the object will outlive the session it came from.

Updating statistics ensures that queries compile with up-to-date statistics. However, updating statistics causes queries to recompile.

We recommend not updating statistics too often because there is a performance tradeoff between improving query plans and the time it takes to recompile queries.What are the after triggers?

It point back to the original table rows after searching. If Rowcount is checked after Error checking statement then it will have 0 as the value of Recordcount as it would have been reset.

A Non-Correlated sub query can be considered as independent query and the output of subquery are substituted in the main query. It is used to define the database structure such as tables. A Unique key constraint uniquely identified each record in the database. UNION operator is used to combine the results of two tables, and it eliminates duplicate rows from the tables. Stored procedures are also used to reduce network traffic and improve performance.