Group By and Having The GROUP BY statement groups rows that have the same values into summary rows, like "find the number of customers in each dept". The GROUP BY statement is must be used with aggregate functions (COUNT, MAX, MIN, SUM, AVG) to group the result-set by one or more columns. GROUP BY Syntax
CREATE TABLE (MSSQL SERVER)
Create Table keyword is used to create table in SQL server database.
for creating table following syntax required to follow.
Create table Emp
(
Id bigint,
Name varchar(100),
Designation varchar(100),
Dept Varchar(100),
[Adress] varchar(200),
Mobile bigint,
Gender varchar(1),
EntryDate Datetime
)
To create table following parameters/inputs required.
- Table Name ( such as Emp,Student etc..)
- Field Name ( such as Id,Name etc..
- Data Type ( such as Biging,Int,Varchar etc..)
View newly created table
Comments
Post a Comment