SQL Detach Database
SQL Detach Database, when you detach a database from SQL Server, database is removed from the instance of SQL Server but kept the database intact within its data files and transaction log files.
![]()
This website provides a SQL server, SSRS, Power BI, Python, Azure basics and advanced tutorials for beginners and professionals .
You will find out a step-by-step walk through of the basics and advanced topics with practical and include numerous hands-on activities.
SQL Detach Database, when you detach a database from SQL Server, database is removed from the instance of SQL Server but kept the database intact within its data files and transaction log files.
![]()
TheĀ DEFAULT constraintĀ is used to provide aĀ default value for a columns, when the INSERT INTO statement does not provide a specific value to columns.
![]()
SQL Server Cross Apply and Outer Apply
SQL Server APPLY operator is like a SQL JOINS, which allows joining two table expressions, but the Difference between APPLY operator and JOINS is the ability of APPLY operator to work with table- valued expression.
![]()
A SQL cursor is a database object that is used to retrieve data from a result set one row at a time. A SQL cursor is used when the data needs to be updated row by row.
![]()
SQL Server FLOOR Function is a mathematical function that returns the largest integer value that is less than or equal to a number.
![]()
SQL Server CEILING Function is a mathematical function that returns the smallest integer value that is greater than or equal to a number.
![]()
Cascading referential integrity constraints are foreign key constraints that is used to defines the action that SQL Server performs when a user try to delete or update a primary key value to which an existing foreign key points.
![]()
Ā SQL Server Dirty Reads problems in concurrent transactions
![]()
SQL Server LAST_VALUE function is a Analytic function which returns the Last value in an ordered set of values.Ā
![]()
SQL Server FIRST_VALUE function is a Analytic function which returns the first value in an ordered set of values.
![]()
SQL ServerĀ Primary keyĀ is used to uniquely identify each rows in the table but sometimes more than one column are used to uniquely identify each rows in the table.
![]()
Print a prime numbers separted by comma for any given number .
Ā Ā For example, the prime number for 10 , wolud beĀ 2,3,5,7 .
Here is the query:
![]()
Query to Get the Students who scored higher than 80 Marks ?
![]()
SQL server allows us to transform a row- level data into columnar data using SQL Pivot.
![]()
SQL Server Clustered index
A clustered index defines the order in which data is physically stored in a table. A table can have only one clustered index because data rows can be only sorted in one order.
![]()
How to get all the tables in database those are having primary key constraints ?
![]()
SQL Server Temporal tables (system-versioned tables) allow us to track data changes. It was introduced in SQL Server 2016.
It allows SQL Server to maintain and manage the history of the data in the table automatically, So we can get all information about the data that was stored at any specified time rather than just the data that is current.
![]()