Knowledge in sql

SQL INSERT INTO Statement

The SQL INSERT INTO StatementThe INSERT INTO statement is used to insert new records in a table.INSERT INTO SyntaxIt is possible to write the INSERT INTO statement in two ways.The first way specifies both the column names and the values to be inserted: INSERT INTO table_name (column1, column2, column3, ...) VALUES (value1, value2, value3, ...); 

SQL NULL Values

What is a NULL Value?A field with a NULL value is a field with no value.If a field in a table is optional, it is possible to insert a new record or update a record without adding a value to this field. Then, the field will be saved with a NULL value.Note: A NULL value is different from a zero value or a field that contains spaces. A field with a NULL value is one that has been left blank during record creation!How to Test for NULL Values?It is not possible to test for NULL values with comparison operators, such as =, <, or <>.We will have to use the IS NULL and IS NOT NULL operators instead.IS NULL Syntax SELECT column_namesFROM table_name WHERE column_name IS NULL; IS NOT NULL Syntax SELECT column_namesFROM table_name WHERE column_name IS NOT NULL; 

SQL UPDATE Statement

The SQL UPDATE StatementThe UPDATE statement is used to modify the existing records in a table.UPDATE Syntax UPDATE table_name SET column1 = value1, column2 = value2, ... WHERE condition; Note: Be careful when updating records in a table! Notice the WHERE clause in the UPDATE statement. The WHERE clause specifies which record(s) that should be updated. If you omit the WHERE clause, all records in the table will be updated!UPDATE TableThe following SQL statement updates the first customer (CustomerID = 1) with a new contact person and a new city.Example UPDATE Customers SET ContactName = 'Alfred Schmidt', City= 'Frankfurt' WHERE CustomerID = 1;

SQL DELETE Statement

The SQL DELETE StatementThe DELETE statement is used to delete existing records in a table.DELETE Syntax DELETE FROM table_name WHERE condition;SQL DELETE ExampleThe following SQL statement deletes the customer "Alfreds Futterkiste" from the "Customers" table:Example DELETE FROM Customers WHERE CustomerName='Alfreds Futterkiste';Delete All RecordsIt is possible to delete all rows in a table without deleting the table. This means that the table structure, attributes, and indexes will be intact: DELETE FROM table_name; The following SQL statement deletes all rows in the "Customers" table, without deleting the table:Example DELETE FROM Customers;

SQL TOP, LIMIT or ROWNUM Clause

The SQL SELECT TOP ClauseThe SELECT TOP clause is used to specify the number of records to return.The SELECT TOP clause is useful on large tables with thousands of records. Returning a large number of records can impact performance.SQL Server / MS Access Syntax: SELECT TOP number|percent column_name(s) FROM table_nameWHERE condition; MySQL Syntax: SELECT column_name(s) FROM table_nameWHERE condition LIMIT number; Oracle Syntax: SELECT column_name(s) FROM table_name WHERE ROWNUM <= number; SQL TOP, LIMIT and ROWNUM ExamplesThe following SQL statement selects the first three records from the "Customers" table:Example SELECT TOP 3 * FROM Customers;

SQL level

SQL TOP PERCENT ExampleThe following SQL statement selects the first 50% of the records from the "Customers" table:Example SELECT TOP 50 PERCENT * FROM Customers;The following SQL statement shows the equivalent example using ROWNUM:Example SELECT * FROM CustomersWHERE ROWNUM <= 3;The following SQL statement shows the equivalent example using the LIMIT clause:Example SELECT * FROM CustomersLIMIT 3; 

SQL Overview - SQL Full Notes

This PDF is about topic SQL Overview - SQL Full Notes .This is a part of full SQl Notes.

The Database Essentials - SQL full notes

This PDF is about topic The Database Essentials - SQL full notes.This is a part of full SQl Notes.

PHP and MySQL

PHP consists of a scripting language and an interpreter. Like other scripting languages, PHP enables web developers to define the behavior and logic they need in a web page. These scripts are embedded into the HTML documents that are served by the web server. SQL is Structured Query Language, which is a computer language for storing, manipulating and retrieving data stored in a relational database. SQL is the standard language for Relational Database System.

Entity-Relationship Model

Entity-Relationship Model ● Design Process ● Modeling ● Constraints ● E-R Diagram ● Design Issues ● Weak Entity Sets ● Extended E-R Features ● Design of the Bank Database ● Reduction to Relation Schemas ● Database Design ● UML Useful for the students who are learning the Database Management System and its a basic introduction to the topic of SQL and MongoDB. In this, we understand the need of the client and make the data base according to his needs.

DBMS and SQL

This pdf contains general questions regarding DBMS and SQL subject.

Data Base Management System(DBMS)

This content is about Intro to Database-System, Introduction to the Relational Model ,Introduction to SQL( Intermediate, Advanced), Database Design, E-R Model, Data storage and Querying, Indexing and Hashing, Data Abstraction, Database-System Architectures and Transactions, Multivalued Dependencies ,FNF .