Saturday, 10 December 2016

SQL TUTORIAL - PART 2

SQL TUTORIAL - PART 2

SQL ALIAS

You can rename a table or a column temporarily by giving another name known as alias. The use of table aliases means to rename a table in a particular SQL database.

alias in sql


ID BookName Price Year Domain AuthorName
1 Practical SQL 115 2011 Performance Balan
2 Troubleshooting Oracle 123.45 2015 Security Chandra
3 MySql Query Performance Tuning 60 2009 Programming Sakunthala
4 SQL Fundamentals 136.33 2006 Optimization Dharan


SQL ALTER TABLE

The SQL ALTER TABLE command is used to add, delete or modify columns in an existing table. You would also use ALTER TABLE command to add and drop various constraints on a an existing table.

alter table add column


ID BookName Price Year Domain AuthorName
1 Complete Guide To No-SQL 71.87 2015 Programming Ramanathan
2 Sql Server Interview Questions 60 2011 Programming Varshini Kutty
3 Oracle Database Internals 165 2006 Database Balan
4 Head First SQL 125 2008 Security Hanumanthan


SQL AND OR

WHERE conditions can be combined with AND, OR, and NOT. A WHERE clause with AND requires that two conditions are true.

sql and or


ID BookName Price Year Domain AuthorName
1 The Microsoft Data Warehouse 80 2012 Database Bala Murugan
2 Simply SQL 195 2013 Programming Azaghu Varshith
3 The Complete Guide to Oracle 95 2012 Optimization Chandra
4 Professional MySql 136.33 2015 Performance Harish Karthik


SQL AUTO INCREMENT

The second piece of the puzzle is the IDENTITY constraint, which informs SQL Server to auto increment the numeric value within the specified column anytime a new record is INSERTED.

autoincrement


ID BookName Price Year Domain AuthorName
1 Database Systems Using Oracle 110 2008 Optimization Keshavan
2 Sql Server Cookbook 140 2006 Programming Bala Murugan
3 Securing Oracle 100 2013 Programming Geetha
4 Red Gate Guide to SQL Server 165 2015 Programming Balan


SQL BETWEEN

To specify an exclusive range, use the greater than (>) and less than operators (<). If any input to the BETWEEN or NOT BETWEEN predicate is NULL, the result will include.

sql between two dates


ID BookName Price Year Domain AuthorName
1 Programming With MySQL 140 2015 Optimization Sakunthala
2 Mastering Oracle SQL 85 2009 Programming Dharan
3 Troubleshooting MYSQL 100 2007 Optimization Pandurengan
4 Learing Oracle SQL & Pl/sql 90 2012 Administration Ramanathan


SQL CHECK

This mysql tutorial explains how to use the check constraints in mysql with syntax and examples.

sql check


ID BookName Price Year Domain AuthorName
1 Head First SQL Brain On SQL 170 2012 Performance Varshini Kutty
2 The Database Language SQL 178.69 2009 Database Padmavathi
3 Oracle Interview Questions 95 2006 Security Siva Kumar
4 SQL Visual Quickstart 135 2013 Programming Geetha


SQL CREATE TABLE

The CREATE TABLE statement is used to create a new table in a relational database.

sql create table


ID BookName Price Year Domain AuthorName
1 Oracle Concurrency 90 2012 Database Varshini Kutty
2 Oracle 11g PL/SQL Programming 70 2015 Performance Rishi Keshan
3 SQL Fundamentals 95 2010 Database Nirmala
4 Oracle: The Complete Reference 205 2011 Administration Balan


SQL DEFAULT

SQL - DEFAULT Constraint. The DEFAULT constraint provides a default value to a column when the INSERT INTO statement does not provide a specific value.

sql default value


ID BookName Price Year Domain AuthorName
1 Postgre Sql Server Programming 120 2009 Database Chandra
2 The Gurus Guide To SQL Server 100 2009 Optimization Dharan
3 MySql for professionals 99.99 2013 Programming Nirmala
4 Oracle Cookbook 140 2014 Optimization Keshavan


SQL DELETE

The SQL DELETE Query is used to delete the existing records from a table. You can use WHERE clause with DELETE query to delete selected rows, otherwise all rows will be deleted.

delete sql statement


ID BookName Price Year Domain AuthorName
1 Sql Server Concurrency 190 2012 Programming Nirmala
2 The Complete Guide to MySql 199.97 2007 Performance Bala Murugan
3 The Practical SQL Handbook 185 2015 Programming Hari Krishnan
4 Oracle 11g PL/SQL Programming 105 2013 Optimization Ranjani Mai


SQL DISTINCT

This SQL tutorial explains how to use the SQL DISTINCT clause with syntax ... In this case, the DISTINCT applies to each field listed after the DISTINCT keyword.

select distinct oracle


ID BookName Price Year Domain AuthorName
1 Professional MySql 170 2008 Database Harish Karthik
2 MySql Concurrency 195 2011 Optimization Varshini Kutty
3 Microsoft SQL Server 2012 Bible 71.87 2014 Database Ranjani Mai
4 MySql Interview Questions 115 2014 Administration Balan


SQL FOREIGN KEY

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

foreign key


ID BookName Price Year Domain AuthorName
1 SQL and Relational Theory 71.87 2011 Programming Ranjani Mai
2 Pro Oracle Administration 95 2011 Security Vinoth Kumar
3 Red Gate Guide to SQL Server 170 2007 Performance Sakunthala
4 The Complete Guide to Oracle 165 2015 Security Ramanathan


SQL FULL JOIN

The SQL FULL JOIN combines the results of both left and right outer joins. The joined table will contain all records from both tables, and fill in NULLs for missing rows.

full outer join


ID BookName Price Year Domain AuthorName
1 Database Management 123.45 2010 Security Rishi Keshan
2 MySql Interview Questions 105 2015 Programming Vidyavathi
3 Microsoft SQL Server 2008 190 2015 Administration Devi Mai
4 Pro MySql Administration 65 2006 Database Ramanathan


SQL FUNCTION ABS

SQL ABS() function is used to get the absolute value of a number passed as an argument. An expression which is a numeric value or numeric data type.

abs function


ID BookName Price Year Domain AuthorName
1 Beginning SQL Queries 150 2011 Security Vinoth Kumar
2 MySql Concurrency 170 2013 Programming Vinoth Kumar
3 Advanced SQL Programming 199.97 2011 Optimization Keshavan
4 Learing Sql Server T-Sql 115 2007 Performance Dharan


SQL FUNCTION AVG

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

average in sql


ID BookName Price Year Domain AuthorName
1 Oracle: The Complete Reference 178.69 2014 Security Bala Murugan
2 Teach Yourself SQL 110 2011 Database Vinoth Kumar
3 Head First SQL Brain On SQL 71.87 2007 Security Rishi Keshan
4 Transact SQL Cookbook 200 2013 Security Sakunthala


SQL FUNCTION CEILING

Transact-SQL Reference (Database Engine) Built-in Functions (Transact-SQL) ... shows positive numeric, negative, and zero values with the CEILING function.

ceiling function


ID BookName Price Year Domain AuthorName
1 SQL and Relational Theory 85 2012 Administration Devi Mai
2 The Gurus Guide To SQL Server 145 2015 Optimization Hari Krishnan
3 Sql Server T-sql By Example 130 2014 Security Balan
4 The Complete Guide to MySql 165 2013 Performance Azaghu Varshith


SQL FUNCTION CHARINDEX

The CHARINDEX string function returns the starting position of the specified expression in a character string.

charindex


ID BookName Price Year Domain AuthorName
1 SQL For Microsoft Access 125 2009 Optimization Vidyavathi
2 The Microsoft Data Warehouse 165 2011 Database Devi Mai
3 SQL Pocket Guide 84.22 2006 Performance Sakunthala
4 Oracle Query Performance Tuning 100 2007 Programming Ranjani Mai


SQL FUNCTION CONCAT

CONCAT (Transact-SQL) Returns a string that is the result of concatenating two or more string values.

sql concat


ID BookName Price Year Domain AuthorName
1 Troubleshooting MYSQL 195 2012 Optimization Chandra
2 Pro Oracle Administration 105 2010 Security Sakunthala
3 MySql Database Internals 60 2006 Optimization Harish Karthik
4 Access 2010 Pure Sql 90 2010 Programming Sakunthala


SQL FUNCTION COUNT

SQL COUNT function is the simplest function and very useful in counting the number of records, which are expected to be returned by a SELECT statement.

sql count


ID BookName Price Year Domain AuthorName
1 Professional Microsoft SQL Server 123.45 2015 Programming Nirmala
2 Simply SQL 99.99 2011 Optimization Ramanathan
3 SQL Functions Reference 115 2012 Performance Azaghu Varshith
4 MySQL: The Complete Reference 145 2012 Optimization Devi Mai


SQL FUNCTION DATEADD

In SQL Server (Transact-SQL), the DATEADD function returns a date after which a certain time/date interval has been added.

sql date


ID BookName Price Year Domain AuthorName
1 SQL Design Patterns 168.27 2011 Database Azaghu Varshith
2 Sql Server Cookbook 155 2014 Optimization Geetha
3 MySql Database Internals 105 2011 Performance Sakunthala
4 The Gurus Guide To SQL Server 125 2008 Optimization Chandra


SQL FUNCTION DATEDIFF

DATEDIFF (Transact-SQL) Returns the count (signed integer) of the specified datepart boundaries crossed between the specified startdate and enddate.

sql datediff


ID BookName Price Year Domain AuthorName
1 SQL Server 2012 Black Book 85 2008 Optimization Balan
2 Mastering Oracle SQL 95 2006 Optimization Pandurengan
3 Programming With MySQL 160 2014 Security Varshini Kutty
4 My SQL Complete Reference 155 2006 Administration Hari Krishnan


SQL FUNCTION DATEPARTS

DATEPART implicitly casts string literals as a datetime2 type. This means that DATEPART does not support the format YDM when the date is passed as a string.

datepart


ID BookName Price Year Domain AuthorName
1 Database Management 155 2011 Database Ramanathan
2 Sql Server T-sql By Example 84.22 2015 Performance Geetha
3 MySql for professionals 135 2006 Programming Devi Mai
4 MySql Interview Questions 75 2008 Performance Bala Murugan


SQL FUNCTION FLOOR

SQL DISTINCT along with the SQL FLOOR() function is used to retrieve only unique value after rounded down to the next least integer value depending on the column specified.

sql floor


ID BookName Price Year Domain AuthorName
1 MySql for professionals 180 2014 Security Vinoth Kumar
2 Access 2010 Pure Sql 145 2006 Security Balan
3 Mastering Oracle SQL 195 2012 Optimization Ranjani Mai
4 Getting Started With SQL 150 2009 Security Sakunthala


SQL FUNCTION MAX

In some cases, you will be required to use the SQL GROUP BY clause with the SQL MAX function.

sql max date


ID BookName Price Year Domain AuthorName
1 SQL Server Database Internals 60 2007 Security Bala Murugan
2 MySql All-in-One For Dummies 199.97 2008 Programming Rishi Keshan
3 Oracle Query Performance Tuning 99.99 2015 Administration Hanumanthan
4 My SQL Complete Reference 200 2010 Database Rishi Keshan


SQL FUNCTION MID

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

sql mid


ID BookName Price Year Domain AuthorName
1 Making Sense Of SQL 170 2006 Optimization Dharan
2 Simply SQL 178.69 2009 Optimization Geetha
3 Understanding the New SQL 175 2015 Security Devi Mai
4 SQL Made Simple... By Examples 115 2010 Programming Dharan


SQL FUNCTION MIN

The MIN() Function. The MIN() function returns the smallest value of the selected column.

php min


ID BookName Price Year Domain AuthorName
1 MySql Concurrency 150 2012 Optimization Vidyavathi
2 Pro SQL Azure 135 2015 Performance Padmavathi
3 SQL Visual Quickstart 205 2011 Administration Keshavan
4 Troubleshooting SQL Server 99.99 2008 Database Padmavathi


SQL FUNCTION NOW

The following table lists the most important built-in date functions in MySQL: NOW(), Returns the current date and time.

sql now


ID BookName Price Year Domain AuthorName
1 SQL for students 70 2011 Programming Vidyavathi
2 Professional MySql 75 2009 Security Chandra
3 Professional Microsoft SQL Server 84.22 2009 Administration Padmavathi
4 Programming With Sql Server T-Sql 145 2006 Optimization Devi Mai


SQL FUNCTION RAND

SQL Server Database Engine assigns a seed value at random. For a specified seed value, the result returned is always the same.

rand function


ID BookName Price Year Domain AuthorName
1 Transact SQL Cookbook 95 2014 Security Chandra
2 MySql Concurrency 185 2010 Optimization Padmavathi
3 MySql Fundamentals 71.87 2008 Security Chandra
4 Microsoft SQL Server 2012 Bible 110 2012 Programming Dharan


SQL FUNCTION REPLACE

In SQL Server (Transact-SQL), the REPLACE function replaces a sequence of characters in a string with another set of characters, not case-sensitive.

sql server replace


ID BookName Price Year Domain AuthorName
1 SQL Pocket Guide 175 2007 Administration Balan
2 Microsoft SQL Server 2008 123.45 2009 Database Hari Krishnan
3 SQL Server All-in-One For Dummies 95 2009 Performance Chandra
4 Mastering Oracle SQL 190 2014 Performance Ramanathan


SQL FUNCTION ROUND

The number of decimal places rounded to. This value must be a positive or negative integer. If this parameter is omitted, the ROUND function will round the number to 0 decimal places.

round sql


ID BookName Price Year Domain AuthorName
1 Oracle 11g PL/SQL Programming 190 2009 Performance Vinoth Kumar
2 From Access To SQL Server 84.22 2010 Security Vidyavathi
3 Making Sense Of SQL 130 2013 Optimization Pandurengan
4 Getting Started With SQL 165 2013 Security Vidyavathi


SQL FUNCTION SQRT

SQRT (Transact-SQL) Returns the square root of the specified float value.

sql sqrt


ID BookName Price Year Domain AuthorName
1 MySql Interview Questions 70 2012 Optimization Bala Murugan
2 A Visual Introduction To Sql 120 2008 Security Sakunthala
3 SQL Made Simple... By Examples 84.22 2014 Programming Dharan
4 MySql All-in-One For Dummies 168.27 2010 Programming Chandra


SQL FUNCTION SUM

Because you have listed one column in your SQL SELECT statement that is not encapsulated in the SQL SUM function, you must use the SQL GROUP BY clause.

sql sum


ID BookName Price Year Domain AuthorName
1 Introduction to SQL and PL/SQL 80 2011 Optimization Chandra
2 Oracle Interview Questions 125 2007 Database Harish Karthik
3 Data Analysis Using SQL 155 2015 Database Devi Mai
4 Sql Server T-sql By Example 145 2014 Administration Harish Karthik


SQL GROUP BY

The SQL GROUP BY clause is used in collaboration with the SELECT statement to arrange identical data into groups.

sql group by


ID BookName Price Year Domain AuthorName
1 Sql Server Cookbook 60 2008 Security Sakunthala
2 Oracle Interview Questions 80 2011 Security Harish Karthik
3 Making Sense Of SQL 165 2007 Programming Chandra
4 Oracle Database Internals 178.69 2007 Programming Pandurengan


SQL HAVING

HAVING filters records that work on summarized GROUP BY results. HAVING applies to summarized group records, whereas WHERE applies to individual records.

having sql


ID BookName Price Year Domain AuthorName
1 SQL Design Patterns 199.97 2015 Database Sakunthala
2 MySql Concurrency 190 2009 Optimization Vidyavathi
3 Troubleshooting SQL Server 136.33 2010 Database Harish Karthik
4 Oracle Interview Questions 135 2012 Administration Padmavathi


SQL IN

The IN conditional operator is really a set membership test operator.

in sql


ID BookName Price Year Domain AuthorName
1 The Complete Guide to SQL Server 70 2007 Security Dharan
2 SQL For Microsoft Access 110 2010 Administration Ranjani Mai
3 The Practical SQL Handbook 84.22 2010 Programming Hari Krishnan
4 Microsoft SQL Server 2012 80 2009 Administration Keshavan


SQL INNER JOIN

The most frequently used and important of the joins is the INNER JOIN. They are also referred to as an EQUIJOIN. The INNER JOIN creates a new result table by combining two tables.

inner join


ID BookName Price Year Domain AuthorName
1 Natural language Query To SQL 140 2011 Administration Azaghu Varshith
2 From Access To SQL Server 71.87 2009 Security Ranjani Mai
3 Oracle Cookbook 205 2012 Database Sakunthala
4 Pro Oracle Administration 195 2012 Administration Ramanathan


SQL INSERT INTO

The SQL INSERT INTO clause has actually two parts - the first specifying the table we are inserting into and giving the list of columns we are inserting values for new records.

insert into from select


ID BookName Price Year Domain AuthorName
1 SQL Design Patterns 75 2010 Programming Hanumanthan
2 Oracle 11g PL/SQL Programming 123.45 2007 Performance Vinoth Kumar
3 Pro MySql Administration 180 2013 Optimization Dharan
4 MySql Database Internals 105 2011 Programming Harish Karthik


SQL INSERT INTO SELECT

You can use the INSERT and SELECT statements to add rows to a table in the following The INSERT statement inserts data-values as one or more rows into the ... the SQL Server Database Engine generates the values for these columns.

t sql insert into select


ID BookName Price Year Domain AuthorName
1 Access 2010 Pure Sql 199.97 2006 Optimization Balan
2 MySql for professionals 100 2008 Optimization Varshini Kutty
3 Red Gate Guide to SQL Server 140 2013 Optimization Siva Kumar
4 Postgre Sql Server Programming 80 2009 Security Balan


SQL LEFT JOIN

The SQL LEFT JOIN returns all rows from the left table, even if there are no matches in the right table. This means that if the ON clause matches 0 (zero) records.

left join


ID BookName Price Year Domain AuthorName
1 MySql Query Performance Tuning 75 2013 Performance Siva Kumar
2 A Visual Introduction To Sql 199.97 2011 Optimization Azaghu Varshith
3 Troubleshooting MYSQL 170 2006 Administration Rishi Keshan
4 Programming With MySQL 140 2009 Performance Harish Karthik


SQL LIKE

The SQL LIKE clause is used to compare a value to similar values using wildcard operators. There are two wildcards used in conjunction with the LIKE operator.

like sql


ID BookName Price Year Domain AuthorName
1 Oracle Concurrency 145 2006 Optimization Harish Karthik
2 Sql Server Cookbook 175 2010 Performance Varshini Kutty
3 SQL and Relational Theory 155 2014 Security Azaghu Varshith
4 Simply SQL 123.45 2009 Programming Harish Karthik


SQL NOT NULL

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

is not null sql


ID BookName Price Year Domain AuthorName
1 SQL Fundamentals 165 2008 Database Devi Mai
2 SQL Server Fundamentals 160 2008 Performance Vidyavathi
3 Postgresql Official Documentation 99.99 2008 Performance Siva Kumar
4 My SQL Complete Reference 105 2010 Optimization Hari Krishnan


SQL ORDER BY

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

order by sql


ID BookName Price Year Domain AuthorName
1 SQL in Easy Steps 199.97 2011 Programming Keshavan
2 SQL Puzzles & Answers 136.33 2009 Database Harish Karthik
3 Pro SQL Azure 180 2015 Database Harish Karthik
4 The Microsoft Data Warehouse 155 2011 Performance Rishi Keshan


SQL PRIMARY KEY

A primary key is a field in a table which uniquely identifies each row/record in a database table. ... A primary key column cannot have NULL values.

primary key


ID BookName Price Year Domain AuthorName
1 The Complete Guide to SQL 115 2014 Security Pandurengan
2 My SQL Complete Reference 165 2008 Optimization Harish Karthik
3 SQL Server All-in-One For Dummies 155 2007 Database Harish Karthik
4 SQL Server Database Internals 80 2013 Administration Keshavan


SQL RIGHT JOIN

The SQL RIGHT JOIN returns all rows from the right table, even if there are no matches in the left table. This means that if the ON clause matches 0 (zero).

right sql


ID BookName Price Year Domain AuthorName
1 How to Write Accurate SQL Code 150 2009 Optimization Azaghu Varshith
2 Understanding the New SQL 84.22 2010 Administration Ramanathan
3 Programming With MySQL 190 2015 Security Padmavathi
4 The Complete Guide to Oracle 75 2009 Programming Keshavan


SQL SELECT

In most applications, SELECT is the most commonly used data manipulation language (DML) command. As SQL is a declarative programming language, SELECT queries specify a result set, but do not specify how to calculate it.

select from select sql


ID BookName Price Year Domain AuthorName
1 MySql Query Performance Tuning 99.99 2011 Performance Harish Karthik
2 Pro MySql Administration 180 2011 Optimization Bala Murugan
3 Microsoft SQL Server 2012 170 2012 Security Siva Kumar
4 Pro Oracle SQL 175 2008 Administration Padmavathi


SQL TOP

All the databases do not support TOP clause. For example MySQL supports LIMIT clause to fetch limited number of records and Oracle uses ROWNUM to fetch limited number of records.

select top sql


ID BookName Price Year Domain AuthorName
1 Sql Server Cookbook 71.87 2007 Administration Hanumanthan
2 Oracle 11g PL/SQL Programming 155 2010 Optimization Nirmala
3 Professional Oracle 160 2011 Administration Siva Kumar
4 SQL Programming & Database Design 190 2015 Security Dharan


SQL UNION

The SQL UNION clause/operator is used to combine the results of two or more SELECT statements without returning any duplicate rows.

union sql


ID BookName Price Year Domain AuthorName
1 Sql Server T-sql By Example 140 2014 Programming Dharan
2 How to Write Accurate SQL Code 130 2008 Optimization Keshavan
3 SQL Fundamentals 195 2010 Administration Keshavan
4 SQL: The Complete Reference 90 2013 Administration Chandra


SQL UNIQUE

SQL - Syntax. ... The UNIQUE Constraint prevents two records from having identical values in a particular column.

primary key vs unique key


ID BookName Price Year Domain AuthorName
1 Learing Oracle SQL & Pl/sql 100 2006 Performance Siva Kumar
2 Troubleshooting Oracle 99.99 2014 Database Sakunthala
3 SQL For Microsoft Access 65 2011 Security Chandra
4 PHP And MySQL Bible 190 2013 Security Vinoth Kumar


SQL UPDATE

The SQL UPDATE Query is used to modify the existing records in a table. You can use WHERE clause with UPDATE query to update selected rows otherwise all rows will be updated.

sql update


ID BookName Price Year Domain AuthorName
1 Oracle All-in-One For Dummies 99.99 2015 Programming Vinoth Kumar
2 MySQL: The Complete Reference 150 2009 Performance Siva Kumar
3 Sql Server T-sql By Example 125 2011 Database Vidyavathi
4 Sql Server Concurrency 71.87 2012 Administration Siva Kumar


SQL WHERE

WHERE clauses are not mandatory clauses of SQL DML statements, but can be used to limit the number of rows affected by a SQL DML statement or returned by a query.

sql multiple where


ID BookName Price Year Domain AuthorName
1 How to Write Accurate SQL Code 71.87 2012 Database Ranjani Mai
2 Head First SQL Brain On SQL 90 2012 Performance Vinoth Kumar
3 Red Gate Guide to SQL Server 75 2015 Security Keshavan
4 Professional MySql 178.69 2007 Database Rishi Keshan


No comments:

Post a Comment