close[x]


SQL

SQL-Home SQL-Basic syntax SQL-Data Type SQL-Operator SQL-Create DB SQL-Select DB SQL-Delete Statement SQL-Drop DB SQL-Back Up DB SQL-Create table SQL-Drop table SQL-Alter table SQL-Insert Statement SQL-Select Statement SQL-And & Or SQL-Update table SQL-Top SQL-Like SQL-Order by SQL-Group by SQL-Sorting SQL-Distinct SQL-Min SQL-Max SQL-Count SQL-Average SQL-Sum SQL-In SQL-Between SQL-Join SQL-Left join SQL-Right join SQL-Full join SQL-Inner join SQL-Union SQL-Having SQL-Comments SQL-Exists SQL-Not null SQL-Unique SQL-Primary key SQL-Foreign key SQL-Truncate SQL-Increment SQL-Default values SQL-Where SQL-View SQL-Date SQL-Limit SQL-Index SQL-Temporary SQL-Store Procedure SQL-Injection



learncodehere.com



SQL Tutorial

  • SQL stands for Structured Query Language.
  • It is designed for managing data in a relational database management system (RDBMS).
  • SQL is a standard language for accessing and manipulating databases.
  • SQL is a database language, it is used for database creation, deletion, fetching rows, and modifying rows, etc.
  • SQL (Structured Query Language) is used to perform operations on the records stored in the database such as updating records, deleting records, creating and modifying tables etc
  • SQL is standard database language for all Relational Database Management Systems (RDMS) like MySQL, MS Access, Oracle, Sybase, Informix, Postgres and SQL Server use

  • What SQL does

  • We can query our database in several ways
  • User can access data from a relational database management system
  • Allows users to describe the data
  • Allows users to define the data in the database
  • Allows users to create and drop database and table
  • Allows users to create a view, stored procedure, function in a database.
  • Allows users to set permission on tables, procedures, and views
  • Allows users to retrieve, insert records, update records, delete records in database


  • RDBMS

  • RDBMS stands for Relational Database Management System
  • RDBMS is the basis for SQL
  • Relational database means the data is stored as well as retrieved in the form of relations (tables).

  • RDBMS Terminology

  • let us revise a few definitions related to the database.
  • Database − A database is a collection of tables, with related data.
  • Table − A table is a matrix with data.
  • Column − One column (data element) contains data of one and the same kind
  • Row − A row (= tuple, entry or record) is a group of related data
  • Primary Key − A primary key is unique. A key value can not occur twice in one table. With a key, you can only find one row.
  • Foreign Key − A foreign key is the linking pin between two tables.
  • Index − An index in a database resembles an index at the back of a book.
  • Referential Integrity − Referential Integrity makes sure that a foreign key value always points to an existing row.

  • SQL Commands

  • The standard SQL commands to interact with relational databases are CREATE, SELECT, INSERT, UPDATE, DELETE and DROP.