Saturday, 10 December 2016

Sql Tutorial - Part 1

SQL TUTORIAL - PART 1

SQL ALIAS

SQL aliases are used to give a database table, or a column in a table, a temporary name. Basically aliases are created to make column names more readable.

sql alias


ID BookName Price Year Domain AuthorName
1 Practical SQL 123.45 2006 Performance Geetha
2 Simply MySql 140 2012 Programming Vinoth Kumar
3 SQL Programming & Database Design 75 2015 Performance Siva Kumar
4 Sql Server Cookbook 84.22 2007 Optimization Hari Krishnan


SQL ALTER TABLE

The ALTER TABLE Statement. The ALTER TABLE statement is used to add, delete, or modify columns in an existing table.

sql alter table statement


ID BookName Price Year Domain AuthorName
1 Professional Oracle 168.27 2013 Performance Dharan
2 Simply MySql 155 2011 Database Vidyavathi
3 SQL Visual Quickstart 123.45 2011 Performance Hari Krishnan
4 Pro MySql Administration 95 2011 Database Nirmala


SQL AND OR

The SQL AND & OR Operators. The AND operator displays a record if both the first condition AND the second condition are true. The OR operator displays a record if either the first condition OR the second condition is true.

sql and operator


ID BookName Price Year Domain AuthorName
1 Getting Started With SQL 85 2010 Administration Vidyavathi
2 Programming With Oracle 100 2013 Database Hanumanthan
3 Pro MySql Administration 145 2007 Administration Sakunthala
4 Postgresql Official Documentation 195 2008 Security Balan


SQL AUTO INCREMENT

MySQL uses the AUTO-INCREMENT keyword to perform an auto-increment feature. By default, the starting value for AUTO-INCREMENT is 1, and it will increment by 1 for each new record.

sql auto increment constraint


ID BookName Price Year Domain AuthorName
1 Professional MySql 80 2010 Database Chandra
2 Oracle Database Internals 65 2006 Administration Siva Kumar
3 Advanced SQL Programming 200 2009 Optimization Varshini Kutty
4 The Database Language SQL 199.97 2012 Administration Vidyavathi


SQL BETWEEN

This SQL tutorial explains how to use the SQL BETWEEN condition with syntax and examples.

sql between operator


ID BookName Price Year Domain AuthorName
1 Microsoft SQL Server 2012 185 2010 Administration Rishi Keshan
2 Database Management 175 2015 Optimization Ranjani Mai
3 Data Analysis Using SQL 71.87 2015 Programming Vinoth Kumar
4 Oracle All-in-One For Dummies 178.69 2007 Performance Chandra


SQL CHECK

The following SQL creates a CHECK constraint on the "P-Id" column when the "Persons" table is created.

sql check constraint


ID BookName Price Year Domain AuthorName
1 Data Analysis Using SQL 60 2013 Performance Azaghu Varshith
2 Head First SQL 120 2013 Performance Hanumanthan
3 Oracle Query Performance Tuning 123.45 2007 Programming Siva Kumar
4 Sql Server Cookbook 140 2010 Optimization Sakunthala


SQL CREATE TABLE

The SQL CREATE TABLE Statement. The CREATE TABLE statement is used to create a table in a database.

sql create table statement


ID BookName Price Year Domain AuthorName
1 Database Management 90 2010 Performance Balan
2 Jump Start MySQL 60 2006 Performance Ranjani Mai
3 Making Sense Of SQL 140 2013 Database Rishi Keshan
4 Red Gate Guide to SQL Server 80 2008 Programming Pandurengan


SQL DEFAULT

SQL DEFAULT Constraint. The DEFAULT constraint is used to insert a default value into a column. The default value will be added to all new records, if no other value is specified.

sql default constraint


ID BookName Price Year Domain AuthorName
1 Learing Sql Server T-Sql 120 2007 Administration Vinoth Kumar
2 Database Systems Using Oracle 195 2009 Performance Devi Mai
3 Simply MySql 115 2015 Optimization Vidyavathi
4 Sql Server Concurrency 205 2011 Security Balan


SQL DELETE

The DELETE statement is used to delete records in a table. ... Notice the WHERE clause in the SQL DELETE statement! The WHERE clause specifies which wors should be deleted.

sql delete query


ID BookName Price Year Domain AuthorName
1 Oracle PL/sql By Example 190 2010 Performance Bala Murugan
2 Oracle Cookbook 140 2007 Administration Devi Mai
3 SQL Pocket Guide 199.97 2011 Optimization Bala Murugan
4 Jump Start MySQL 75 2006 Administration Ramanathan


SQL DISTINCT

The SQL DISTINCT keyword is used in conjunction with SELECT statement to eliminate all the duplicate records and fetching only unique records.

sql distinct clause


ID BookName Price Year Domain AuthorName
1 Practical SQL 70 2013 Optimization Devi Mai
2 Making Sense Of SQL 80 2006 Security Ranjani Mai
3 Oracle Interview Questions 99.99 2012 Performance Harish Karthik
4 Programming With MySQL 115 2013 Optimization Sakunthala


SQL FOREIGN KEY

SQL FOREIGN KEY Constraint. A FOREIGN KEY in one table points to a PRIMARY KEY in another table.

sql foreign key constraint


ID BookName Price Year Domain AuthorName
1 Professional MySql 100 2010 Performance Geetha
2 Oracle PL/sql By Example 123.45 2009 Security Varshini Kutty
3 Foundations Of Sql Server 2008 140 2008 Administration Harish Karthik
4 Beginning SQL Queries 168.27 2006 Database Nirmala


SQL FULL JOIN

The FULL OUTER JOIN keyword returns all rows from the left table (table1) and from the right table (table2).

sql full join


ID BookName Price Year Domain AuthorName
1 Getting Started With SQL 130 2007 Administration Dharan
2 MySql Database Internals 160 2012 Security Azaghu Varshith
3 Sql Server Cookbook 65 2014 Security Azaghu Varshith
4 Sql Server T-sql By Example 195 2012 Security Balan


SQL FUNCTION ABS

ABS (Transact-SQL) A mathematical function that returns the absolute (positive) value of the specified numeric expression.

sql abs function


ID BookName Price Year Domain AuthorName
1 Oracle 11g PL/SQL Programming 99.99 2011 Security Hanumanthan
2 MySql Concurrency 195 2013 Administration Vidyavathi
3 The Database Language SQL 185 2008 Programming Chandra
4 Teach Yourself SQL 120 2013 Optimization Hanumanthan


SQL FUNCTION AVG

The AVG() Function. The AVG() function returns the average value of a numeric column.

sql average function


ID BookName Price Year Domain AuthorName
1 Complete Guide To No-SQL 190 2010 Security Hari Krishnan
2 SQL Server All-in-One For Dummies 199.97 2007 Administration Bala Murugan
3 Professional Microsoft SQL Server 65 2006 Administration Ramanathan
4 Art Of SQL 168.27 2006 Performance Keshavan


SQL FUNCTION CEILING

CEIL() function. SQL CEIL() function is used to get the smallest integer which is greater than, or equal to, the specified numeric expression.

sql ceil function


ID BookName Price Year Domain AuthorName
1 Simply SQL 99.99 2011 Optimization Geetha
2 Troubleshooting Oracle 60 2009 Performance Geetha
3 MySql All-in-One For Dummies 105 2006 Administration Varshini Kutty
4 Oracle All-in-One For Dummies 150 2008 Performance Sakunthala


SQL FUNCTION CHARINDEX

This SQL Server tutorial explains how to use the CHARINDEX function in SQL Server (Transact-SQL) with syntax and examples.

sql charindex function


ID BookName Price Year Domain AuthorName
1 SQL Functions Reference 95 2010 Security Hanumanthan
2 Securing Oracle 120 2008 Security Bala Murugan
3 Professional MySql 205 2014 Optimization Ranjani Mai
4 Postgre Sql Server Programming 84.22 2015 Administration Azaghu Varshith


SQL FUNCTION CONCAT

SQL CONCAT Function - Learn SQL (Structured Programming Language) in simple and easy steps starting from basics to advanced concepts.

sql concat function


ID BookName Price Year Domain AuthorName
1 Oracle 11g PL/SQL Programming 125 2007 Security Nirmala
2 SQL Server 2012 Black Book 185 2011 Security Keshavan
3 Postgre Sql Server Programming 178.69 2015 Security Hari Krishnan
4 The Complete Guide to MySql 85 2012 Database Keshavan


SQL FUNCTION COUNT

The COUNT(DISTINCT column-name) function returns the number of distinct values of the specified column.

sql count function


ID BookName Price Year Domain AuthorName
1 MySql Interview Questions 195 2010 Administration Siva Kumar
2 SQL Visual Quickstart 140 2008 Optimization Azaghu Varshith
3 Mastering Oracle SQL 175 2012 Security Vinoth Kumar
4 The Complete Guide to MySql 123.45 2015 Administration Chandra


SQL FUNCTION DATEADD

Using the DATE-ADD function with a negative value as a parameter is equivalent to using the DATE-SUB function.

sql date-add function


ID BookName Price Year Domain AuthorName
1 SQL in Easy Steps 99.99 2012 Performance Hanumanthan
2 Professional MySql 70 2014 Database Ramanathan
3 Oracle 11g PL/SQL Programming 145 2010 Administration Nirmala
4 The Complete Guide to SQL Server 130 2007 Optimization Padmavathi


SQL FUNCTION DATEDIFF

The DATEDIFF() function returns the time between two dates.

sql datediff function


ID BookName Price Year Domain AuthorName
1 SQL Made Simple... By Examples 150 2011 Security Nirmala
2 Simply Oracle 178.69 2007 Performance Padmavathi
3 Getting Started With SQL 135 2009 Database Harish Karthik
4 MySql Query Performance Tuning 105 2011 Security Chandra


SQL FUNCTION DATEPARTS

The DATEPART() function is used to return a single part of a date/time, such as day, month, or year.

sql datepart function


ID BookName Price Year Domain AuthorName
1 Sql Server Concurrency 135 2007 Security Sakunthala
2 Pro MySql Administration 123.45 2006 Optimization Pandurengan
3 Learing Oracle SQL & Pl/sql 168.27 2007 Security Chandra
4 Programming With Oracle 140 2013 Performance Balan


SQL FUNCTION FLOOR

In SQL Server (Transact-SQL), the FLOOR function returns the largest integer value that is equal to or less than a number.

sql floor function


ID BookName Price Year Domain AuthorName
1 Teach Yourself SQL 165 2014 Programming Devi Mai
2 SQL Design Patterns 160 2007 Database Vinoth Kumar
3 Getting Started With SQL 60 2011 Database Balan
4 Beginning SQL Queries 75 2006 Database Vidyavathi


SQL FUNCTION MAX

The MAX() Function. The MAX() function returns the largest value of the selected column.

sql max function


ID BookName Price Year Domain AuthorName
1 Troubleshooting SQL Server 190 2011 Programming Pandurengan
2 Red Gate Guide to SQL Server 105 2009 Database Sakunthala
3 SQL Functions Reference 175 2007 Optimization Chandra
4 SQL Server All-in-One For Dummies 195 2013 Security Pandurengan


SQL FUNCTION MID

The MID() Function. The MID() function is used to extract characters from a text field.

sql mid function


ID BookName Price Year Domain AuthorName
1 Mastering Oracle SQL 70 2014 Security Hari Krishnan
2 The Complete Guide to SQL 199.97 2008 Optimization Vinoth Kumar
3 Art Of SQL 150 2009 Performance Chandra
4 MySQL Cookbook 120 2006 Security Vinoth Kumar


SQL FUNCTION MIN

The SQL MIN function is used to return the minimum value of an expression in a SELECT statement.

sql min function


ID BookName Price Year Domain AuthorName
1 Database Systems Using Oracle 100 2011 Programming Azaghu Varshith
2 Troubleshooting MYSQL 180 2011 Optimization Sakunthala
3 Securing MySql 80 2015 Administration Pandurengan
4 SQL Server 2008 Transact-Sql 123.45 2007 Security Ranjani Mai


SQL FUNCTION NOW

The NOW() function returns the current system date and time.

sql now function


ID BookName Price Year Domain AuthorName
1 Sql Server Cookbook 130 2008 Database Chandra
2 Practical SQL 125 2013 Optimization Hari Krishnan
3 MySql for professionals 195 2011 Security Geetha
4 MySql All-in-One For Dummies 135 2012 Programming Ranjani Mai


SQL FUNCTION RAND

SQL RAND Function - Learn SQL (Structured Programming Language) in simple and easy steps starting from basics to advanced concepts.

sql random function


ID BookName Price Year Domain AuthorName
1 Head First SQL Brain On SQL 160 2015 Database Siva Kumar
2 Simply SQL Server 70 2015 Database Nirmala
3 SQL Design Patterns 75 2008 Programming Padmavathi
4 SQL Puzzles & Answers 60 2011 Administration Azaghu Varshith


SQL FUNCTION REPLACE

REPLACE (Transact-SQL) Replaces all occurrences of a specified string value with another string value.

sql replace function


ID BookName Price Year Domain AuthorName
1 Making Sense Of SQL 175 2015 Administration Vidyavathi
2 Oracle Database 11G New Features 120 2015 Programming Geetha
3 Introduction to SQL and PL/SQL 190 2007 Database Balan
4 Pro MySql Administration 99.99 2010 Administration Pandurengan


SQL FUNCTION ROUND

The ROUND() function is used to round a numeric field to the number of decimals ... When rounding a number with a fractional part to an integer.

sql round function


ID BookName Price Year Domain AuthorName
1 Oracle PL/sql By Example 123.45 2007 Database Vidyavathi
2 A Visual Introduction To Sql 71.87 2008 Programming Ranjani Mai
3 Mastering Oracle SQL 199.97 2007 Programming Vinoth Kumar
4 SQL Design Patterns 95 2006 Optimization Nirmala


SQL FUNCTION SQRT

SQL - SQRT Function. You are seeing float value here because internally SQL will manipulate square root in float data type.

sql sqrt function


ID BookName Price Year Domain AuthorName
1 PHP And MySQL Bible 100 2012 Optimization Vinoth Kumar
2 Oracle: The Complete Reference 90 2010 Performance Geetha
3 Troubleshooting Oracle 145 2010 Optimization Hari Krishnan
4 SQL Visual Quickstart 165 2012 Programming Bala Murugan


SQL FUNCTION SUM

SQL - SUM Function. SQL SUM function is used to find out the sum of a field in various records. You can take sum of various records set using GROUP BY clause.

sql sum function


ID BookName Price Year Domain AuthorName
1 Oracle PL/sql By Example 178.69 2011 Performance Dharan
2 From Access To SQL Server 99.99 2008 Performance Hari Krishnan
3 Simply SQL Server 190 2006 Administration Hari Krishnan
4 Professional Microsoft SQL Server 175 2015 Optimization Geetha


SQL GROUP BY

Aggregate functions often need an added GROUP BY statement. The GROUP BY statement is used in conjunction with the aggregate functions to group the result set.

sql group by clause


ID BookName Price Year Domain AuthorName
1 Securing MySql 155 2015 Performance Geetha
2 Microsoft SQL Server 2012 165 2006 Performance Chandra
3 Pro MySql Administration 190 2012 Administration Sakunthala
4 Postgre Sql Server Programming 175 2015 Optimization Geetha


SQL HAVING

The HAVING clause was added to SQL because the WHERE keyword could not be used with ... HAVING aggregate-function(column-name) operator value.

sql having clause


ID BookName Price Year Domain AuthorName
1 Simply Oracle 80 2010 Optimization Sakunthala
2 Practical SQL 135 2012 Optimization Ramanathan
3 My SQL Complete Reference 85 2010 Performance Vinoth Kumar
4 Red Gate Guide to SQL Server 160 2008 Security Hari Krishnan


SQL IN

The IN Operator. The IN operator allows you to specify multiple values in a WHERE clause. ... IN Operator Example.

sql in operator


ID BookName Price Year Domain AuthorName
1 SQL for students 75 2013 Administration Dharan
2 SQL: The Complete Reference 84.22 2015 Programming Hari Krishnan
3 PHP And MySQL Bible 65 2011 Optimization Rishi Keshan
4 Simply MySql 199.97 2014 Programming Siva Kumar


SQL INNER JOIN

SQL INNER JOIN Keyword. The INNER JOIN keyword selects all rows from both tables as long as there is a match between the columns in both tables.

sql inner join


ID BookName Price Year Domain AuthorName
1 MySql Fundamentals 140 2013 Administration Pandurengan
2 SQL Functions Reference 99.99 2007 Optimization Pandurengan
3 MySql All-in-One For Dummies 130 2012 Security Rishi Keshan
4 MySql Query Performance Tuning 175 2007 Administration Hari Krishnan


SQL INSERT INTO

An SQL INSERT statement adds one or more records to any single table in a relational database. Use the INSERT statement to insert data values into tables.

insert into sql


ID BookName Price Year Domain AuthorName
1 The Database Language SQL 170 2010 Administration Rishi Keshan
2 Advanced SQL Programming 155 2010 Optimization Chandra
3 The Complete Guide to SQL 100 2007 Optimization Azaghu Varshith
4 Oracle: The Complete Reference 110 2011 Performance Ramanathan


SQL INSERT INTO SELECT

The INSERT INTO SELECT statement copies data from one table and inserts it into an existing table.

sql insert into select


ID BookName Price Year Domain AuthorName
1 Sql Server T-sql By Example 200 2007 Security Hanumanthan
2 SQL Server 2008 Transact-Sql 100 2013 Optimization Balan
3 Getting Started With SQL 175 2014 Database Dharan
4 Pro Oracle SQL 180 2015 Optimization Siva Kumar


SQL LEFT JOIN

The LEFT JOIN keyword returns all rows from the left table (table1), with the matching rows in the right table (table2).

sql left join


ID BookName Price Year Domain AuthorName
1 Learing Oracle SQL & Pl/sql 84.22 2014 Programming Nirmala
2 My SQL Complete Reference 130 2010 Programming Padmavathi
3 Pro Oracle Administration 99.99 2011 Programming Devi Mai
4 MySql Fundamentals 90 2009 Security Pandurengan


SQL LIKE

The LIKE operator is used in a WHERE clause to search for a specified pattern in a column. The SQL LIKE Operator.

sql like operator


ID BookName Price Year Domain AuthorName
1 Sql Server Interview Questions 70 2011 Programming Harish Karthik
2 SQL Server Database Internals 175 2008 Optimization Keshavan
3 Introduction to SQL and PL/SQL 185 2013 Security Azaghu Varshith
4 Mastering Oracle SQL 160 2009 Security Vinoth Kumar


SQL NOT NULL

The NOT NULL constraint enforces a column to NOT accept NULL values. The NOT NULL constraint enforces a field to always contain a value.

sql not null constraint


ID BookName Price Year Domain AuthorName
1 Getting Started With SQL 140 2014 Security Ranjani Mai
2 Easy Oracle PL/SQL Programming 120 2007 Performance Keshavan
3 Securing MySql 200 2007 Administration Harish Karthik
4 Introduction to SQL and PL/SQL 115 2011 Administration Nirmala


SQL ORDER BY

The ORDER BY keyword sorts the records in ascending order by default. To sort the records in a descending order, you can use the DESC keyword.

sql order by clause


ID BookName Price Year Domain AuthorName
1 Mastering Oracle SQL 105 2007 Administration Sakunthala
2 SQL Server 2012 Black Book 99.99 2010 Optimization Balan
3 Postgresql Official Documentation 140 2012 Optimization Dharan
4 Beginning SQL Queries 71.87 2009 Security Hari Krishnan


SQL PRIMARY KEY

SQL PRIMARY KEY Constraint. The PRIMARY KEY constraint uniquely identifies each record in a database table. Primary keys must contain UNIQUE values.

sql primary key constraint


ID BookName Price Year Domain AuthorName
1 SQL Visual Quickstart 100 2007 Performance Geetha
2 Head First SQL Brain On SQL 185 2014 Administration Nirmala
3 Introduction to SQL and PL/SQL 125 2008 Administration Bala Murugan
4 SQL Design Patterns 178.69 2009 Administration Vidyavathi


SQL RIGHT JOIN

The RIGHT JOIN keyword returns all rows from the right table (table2), with the matching rows in the left table (table1).

sql right join


ID BookName Price Year Domain AuthorName
1 Teach Yourself SQL 136.33 2015 Database Keshavan
2 My SQL Complete Reference 123.45 2011 Programming Devi Mai
3 Oracle Database Internals 75 2012 Performance Rishi Keshan
4 Mastering Oracle SQL 180 2013 Administration Chandra


SQL SELECT

The SQL SELECT statement returns a result set of records from one or more tables. A SELECT statement retrieves zero or more rows from one or more database tables or database views.

sql select query


ID BookName Price Year Domain AuthorName
1 Head First SQL Brain On SQL 150 2009 Database Pandurengan
2 SQL Server 2008 Transact-Sql 105 2011 Optimization Keshavan
3 Sql Server T-sql By Example 65 2013 Programming Devi Mai
4 Oracle: The Complete Reference 99.99 2014 Programming Varshini Kutty


SQL TOP

SQL - TOP, LIMIT or ROWNUM Clause. The SQL TOP clause is used to fetch a TOP N number or X percent records from a table.

sql top clause


ID BookName Price Year Domain AuthorName
1 Art Of SQL 180 2006 Database Dharan
2 Professional Oracle 71.87 2014 Optimization Vidyavathi
3 Sql Server Cookbook 120 2006 Administration Sakunthala
4 The Practical SQL Handbook 160 2011 Optimization Devi Mai


SQL UNION

The SQL UNION operator combines the result of two or more SELECT statements. ... Note: The UNION operator selects only distinct values by default.

sql union


ID BookName Price Year Domain AuthorName
1 Oracle Query Performance Tuning 165 2012 Optimization Vidyavathi
2 Advanced SQL Programming 160 2009 Performance Varshini Kutty
3 SQL For Microsoft Access 115 2012 Administration Hari Krishnan
4 Mastering Oracle SQL 80 2010 Optimization Varshini Kutty


SQL UNIQUE

SQL UNIQUE Constraint. The UNIQUE constraint uniquely identifies each record in a database table. The UNIQUE and PRIMARY KEY constraints both provide unique value.

sql unique constraint


ID BookName Price Year Domain AuthorName
1 Oracle Database Internals 84.22 2007 Programming Nirmala
2 Mastering Oracle SQL 175 2006 Administration Vidyavathi
3 A Visual Introduction To Sql 150 2011 Database Padmavathi
4 Oracle Concurrency 180 2010 Security Bala Murugan


SQL UPDATE

The UPDATE statement is used to update records in a table. ... Notice the WHERE clause in the SQL UPDATE statement! The WHERE clause specifies which row should be updated.

sql update query


ID BookName Price Year Domain AuthorName
1 Postgre Sql Server Programming 75 2012 Optimization Siva Kumar
2 SQL Visual Quickstart 199.97 2011 Administration Varshini Kutty
3 SQL Fundamentals 95 2006 Security Keshavan
4 Oracle Cookbook 70 2014 Optimization Ranjani Mai


SQL WHERE

A WHERE clause in SQL specifies that a SQL Data Manipulation Language (DML) statement should only affect rows that meet specified criteria. The criteria are expressed in the form of predicates.

sql where statement


ID BookName Price Year Domain AuthorName
1 Pro Oracle SQL 105 2008 Optimization Hanumanthan
2 Microsoft SQL Server 2012 180 2013 Administration Azaghu Varshith
3 Mastering Oracle SQL 123.45 2012 Programming Keshavan
4 Learing Sql Server T-Sql 90 2013 Programming Hari Krishnan


1 comment: