Home / Database

Database

Sub queries In SQL Server

query

What is Query ? A statement that request data from database is called as query. e.g. Select statement request data to the database so select statement is a query statement. What is Sub Query ?Definition ? A select statement used inside another select statement is called subquery statement. Subquery must ...

Read More »

Inner Join in SQL Server

inner

Joins are used to combine the data of two or more tables using single select statement. Joins are classified into Inner Joins, Outer Join & Cross Join. The Inner & Outer join again classified into several subtypes as Equi Join, Non-Equi Join, Natural join & Self join. Syntax : SELECT ...

Read More »

Union , Intersect and Except Set Operators

operator

Set Operators : Definition : Set operators are useful in performing the mathematical operations on the data present in the table. There must be at least two select statement so that the operations can be performed on the data by comparing the data from each select statement. Rules to be ...

Read More »

Database level Queries & Identity functions

Database

Get list of tables in the Database: We can get all the tables in the database by using one of the following queries. SELECT * FROM SYS.OBJECTS WHERE TYPE=’u’ SELECT * FROM INFORMATION_SCHEMA.TABLES Get list of columns of a Table: To get the list of columns present in the table, ...

Read More »

Difference between Delete and Truncate command

Delete Command

Difference between Delete and Truncate command Delete Command 1. It allows to delete all rows as well as specific rows from table. 2. It deletes rows one by one. 3. Delete command is comes under DML & it does not deallocate the memory after deleting rows. 4. Id delete command is used to ...

Read More »

Predicates in SQL Server 2008

sql

Predicates in SQL Server 2008 Any operator that is used within the select clause condition in where clause is a predicate. SQL provides several of these predicates to simplify the conditions used in where clause. IN In predicate can be used to check the specific value is present in the ...

Read More »

People Who Work With The Database

Database

The people who use the database can be categorized into two different category , these are as follows: Database users Database administrator (DBA) Database clients are of four distinct sorts: 1) Naive clients: These are the unsophisticated clients who connect with the framework by summoning one of the application programs ...

Read More »

How to Modify table information in SQL database?

Modify Table

Modify Table Structure: We can modify table structure by adding/altering the table using following commands. Add Columns: While adding columns constraints can be applied to the columns. If tables contains data then it won’t be possible to apply “Not Null” & “Primary Key” constraint on the column. Syntax is : ...

Read More »

How to create table in SQL database?

create table

Create table in SQL Database. In below article we will see how to create table , delete table, update table and select table in qul database .It is easy to create table in sql. Create Table Command: To create table in the database following syntax is used. Create Table < ...

Read More »