Tags » SQL Query

To Display Column Name, Column Data Type and Schema for Particular Table

Below is the query to get a Table Column Name, DataType and its Schema.

Note: Run the Query in Database where you information about particular table. 154 more words

SQL Query

Difference Between SET and Select when Assigning Variable To it

To Assign variable, first we have to Declare variable and then assign it. There are two method to assign variable SET and SELECT. 

Syntax: 112 more words

SQL Query

SQL Query Helper

01) enter multiple values at a time : insert into employee values(&emp_no,’&emp_name’,&emp_sal,&emp_comm,&dept_no);
02) creating normal table : create table deposit ( a_no varchar2(5),cname varchar2(15),bname varchar2(10),amount number(7,2),a_date date); 690 more words


Find the Employee with the 2nd Highest Salary

SELECT EmployeeId, Salary
Select EmployeeId, Salary, ROW_NUMBER() OVER(Order by Salary Desc) as Salary_Order
from Employee
) DT
WHERE DT. Salary_Order = 2 ; 20 more words


Using SQL Snapshot backups along with Availability group

Snapshot backup is beautiful option during releases and deploying changes
specially when the database size is large like few hundreds of GBs. We have a practice to take snapshot backup during the release and delete once testing is completed on a 600+GB database. 159 more words


SQL Tricks: fetch numeric value from a varchar field

Description: if a column (field) of your table has varchar datatype and that field is containing both numeric and character data, if you want to fetch only numeric data , use below query: 8 more words


How to give access to Users in Secondary Always-On/Mirror Server

When we need to provide access to users on a secondary database we will be able to create a login but not user on the read-only database. 192 more words