Updating two tables in a single query in sql

From basics up to questions asked on advanced concepts of SQL have been also covered in this article.

You can go through these questions for a quick revision of major SQL concepts before appearing for an interview.

For Example, if we join two tables having 15 and 20 columns the Cartesian product of two tables will be 15×20=300 Rows.

A stored procedure is a collection of SQL statements which can be used as a function to access the database.

The Select statement is used as partial DML statement that is used to select all or relevant records in the table.3) DCL (Data Control Language): These statements are used to set privileges such as Grant and Revoke database access permission to the specific user.

Constraints are used to set the rules for all records in the table.

These are the most common and useful SQL interview questions useful for freshers as well as experienced candidates.

Triggers may implement data modification logic by using INSERT, UPDATE, and DELETE statement.

These triggers that contain data modification logic and find other triggers for data modification are called Nested Triggers. When a one table’s primary key field is added to related tables in order to create the common field which relates the two tables, it called a foreign key in other tables. DELETE removes some or all rows from a table based on the condition. TRUNCATE removes ALL rows from a table by de-allocating the memory pages.

We can create these stored procedures previously before using it and can execute these them wherever we require and also apply some conditional logic to it.

Stored procedures are also used to reduce network traffic and improve the performance.

Search for updating two tables in a single query in sql:

updating two tables in a single query in sql-56updating two tables in a single query in sql-88updating two tables in a single query in sql-33

Leave a Reply

Your email address will not be published. Required fields are marked *

One thought on “updating two tables in a single query in sql”