Name | City | |
---|---|---|
ABC | ABC@gmail.com | Kolhapur |
DEF | DEF@gmail.com | Sangli |
GHI | GHI@gmail.com | Satara |
PQR | PQR@gmail.com | Pune |
To create database ->Database-> Create New in sql server management studio OR use below query
CREATE DATABASE databasename
To create table ->Database->Tables-New table OR use below query
CREATE TABLE table_name ( column1 datatype, column2 datatype, column3 datatype, .... )
SQL select statement - is used to select data from a database
SELECT column1, column2, ... FROM table_name;
The SELECT DISTINCT statement - is used to return only distinct (different) values.
SELECT DISTINCT column1, column2, ... FROM table_name
Select top statement - is use to get top / limited records from database table
SELECT TOP number(s)(of records we want) FROM table_name