You are here
Home > Sql Server (Page 2)

SQL Syntax

SQL Syntax SQL follows unique set of guidelines and rules called syntax. SQL is case insensitive. SQL statements start with any of the keywords/ commands like CREATE, DROP, INSERT, UPDATE, DELETE, SELECT, ALTER, USE etc. Here, we are gives you all the basic sql syntax. Create database: create database database_name; Create table: create

SQL: Set Operators

SQL: Set Operators Set operators are used to combine same type of data from two or more tables. SQL supports following operators: a) Union b) Union all c) Intersect d) Except Rules on Set Operators: Column alias must be expressed in the first select statement. Each select statement must have the same number of

SQL DATA TYPES

SQL Data Types Each column in a database has a data type. A data type is a set of values. There are different categories for data types: Approximate numeric: It stores approximations of the numbers based on IEEE 754 standard. float(N): Values in the range from -1.79E+308 to 1.79E+308. real: Values in the

SQL JOIN (SELF JOIN)

SQL JOIN Self Join: Self join is used to join table with itself. Syntax: select column_name(s) from table1 A1,table2 A2 where condition; Here, A1 and A2 are different alias name for the same table. Database Table: Customers Cust_id Name Age City 1 Prince 22 Anand 2 Komal 44 Pune 3 Khusi 30 Delhi 4 Anil 45 Mumbai 5 Abhi 27 Ahmedabad 6 Juhi 35 Baroda   Here, Cust_id is primary key. Example-1: select x.Name as Name1, x.Age as Age1, x.City as City1, y.Name

SQL JOIN (CROSS JOIN)

SQL JOIN Cross Join: Cross join combine each row from the first table with all rows of the second table. In other words, it performs a multiplication between tables. Cross join is also known as Cartesian Join. Syntax: select column_name(s) from table1 cross join table2 We can perform cross join without join clause.

BOOK REVIEW: Exam Ref 70-762 Developing SQL Databases

BOOK REVIEW: Exam Ref 70-762 Developing SQL Databases   Title: Developing SQL Databases Exam Ref 70-762 Authors: Louis Davidson, Stacia Varga Publication Date: January 2017 Publication House: Published with the authorization of Microsoft Corporation by: Pearson Education, Inc. About Authors: Louis Davidson is in IT industry for over 14 years as a corporate database developer and

SQL JOIN (OUTER JOIN)

SQL JOIN Outer Join: Outer join returns all rows from one table and matching rows from second table. There are three types of Outer join: 1) Left Outer Join 2) Right Outer Join 3) Full Outer Join Syntax: select column_name(s) from table_name1 left | right | full [outer] join table_name2 on table_name1. column_name= table_name2. column_name Left Outer

SQL JOIN (INNER JOIN)

SQL JOIN Inner Join or Equi Join: Inner join selects data that have matching values in tables. Inner join is same as join, so we can use either inner join or join keyword. Syntax: select column_name(s) from table_name1 inner join table_name2 on  table_name1.column_name=  table_name2.column_name   OR   select column_name(s) from table_name1 join table_name2 on  table_name1.column_name=  table_name2.column_name Database Table: Customers Cust_id Name Age City 1 Prince 22 Anand 2 Komal 44 Pune 3 Khusi 30 Delhi 4 Anil 45 Mumbai 5 Abhi 27 Ahmedabad 6 Juhi 35 Baroda Here, Cust_id

SQL JOIN

SQL JOIN Sql join is used to combine data from two or more tables in a database. Join keyword is used to join one (self-table) or more tables in sql query. According to ANSI SQL-89 syntax for joining two tables: select [column-list] from table_name1,table_name2 where <where predicate> According to ANSI SQL-92 syntax

SQL Query (DELETE Statement)

SQL Query Delete Statement: Delete statement is used to delete data from table. Delete statement without where clause affects all rows of table. Syntax of Delete statement: delete from <table_name> where condition; Delete can be rolled back. Delete tables can have triggers. Delete is DML command. It does not reset identity

Top