Both AND & OR are used to filter records on more than one condition. AND & OR AND operator displays a records if first condition and second condition is true. OR operator displays a records if either first condition or second condition is true. Example Table:- ID Name Class Roll No 1 Jai B.A 12 2 Mohan
The WHERE clause is used to find only records that fulfill a specified criteria. Where Syntax:- Select * from table name where city=’city name’ Example Table:- ID Name Class Roll No 1 Jai B.A 12 2 Mohan M.A 23 4 Om B.A 2 Select * from example where class=’B.A’ Result:- ID Name Class Roll No 1
In tables some of the columns may contain duplicate values. But you want to list out the (distinct) values of a coloum in that table. The DISTINCT keyword can be used to return only distinct (different) values. First of all create a table. create table dept_test( Deptno int,dname varchar(20),loc varchar(20)) Then insert records into the table you
Query to get total salary of a Department In organizations their are several departments.To calculate the total salary of that department in SQL server is so easy. Query: select deptno ,sum(basic) as total from emp group by deptno Here Deptno refers to Dept which salary you want calculate and basic refers to the Salary column
In this article i will show you you how to get data from sql server in excel by run stored procedure in Microsoft Excel. 1. Open Microsoft Excel. 2. Go to Data tab. 3. Then Go to Other data source menu in it. 4. 5. Fill your details in pop-up box as shown in
Data in sql server is stored in Data pages.Pages in a SQL Server data file are numbered sequentially, starting with zero for first page in data file. Each file in a database has a unique file ID number. To uniquely identify a page in a database, both the file ID and the page number are required.
Sql server mainly consist of three types of files:- Primary File :- The primary data file contains the startup information for the database and points to the other files in the database. User data and all objects can be stored in this file or in secondary data files. Every database has one primary data file.