SQL Tutorial 1: Introduction to SQL




http://www.gcreddy.com/2016/07/introduction-to-sql.html Structured Query Language Commands and Operations, What is SQL?, Purpose of SQL, Who Should …

Original source


33 responses to “SQL Tutorial 1: Introduction to SQL”

  1. Class Notes:
    Introduction to SQL (Structured Query Language)

    1) What is SQL?
    2) Purpose of SQL
    3) Who should learn SQL?
    4) What are the subsets of SQL?
    5) Data Definition Language
    6) Data Manipulation Language
    7) Data Control Language
    ——————————————
    1) What is SQL?

    > SQL stands for Structured Query Language
    > SQL was initially developed at IBM in 1970s
    > SQL is the standard language to communicate with relational database management systems like
    Oracle, MS Access, MS SQL Server, MySQL, DB2, Sybase Etc…
    —————————————————-
    2) Purpose of SQL

    > SQL is used to Create New Databases
    > SQL is used to Create New Tables in a Database
    > SQL is used to Insert records in a Database
    > SQL is used to Update records in a Database
    > SQL is used to Delete records in a Database
    > SQL is used to Retrieve data from a Database
    > SQL is used to execute queries against a Database
    > SQL can set permissions on tables, procedures and views
    > SQL is used to Create stored procedures in a Database
    > SQL is used to Create views in a Database
    ———————————————————
    3) Who should learn SQL?

    i) Database Developers

    > Design and deploy Database table structures, forms, reports and queries etc…

    ii) Database Administrators (DBA)

    > Keeping databases up to date and managing database access
    > Writing Reports, documentation and operating manuals

    iii) Database Testers

    > Verify Data Integrity
    > Verify Data Manipulations (Add, Update and Delete)
    > Verify Data comparisons
    ——————————————-
    4) What are the subsets of SQL?

    SQL Commands can be classified in to groups based on their nature, they are,

    i) Data Definition Language
    ii) Data Manipulation Language
    iii) Data Control Language
    ——————————————————
    5) Data Definition Language

    Important Commands and Operations in Data Definition Language

    i) Create: To create databases and database objects

    ii) Alter: To modify existing database objects

    iii) Drop: To drop databases and databases objects

    iv) Truncate: To remove all records from a table

    v) Rename: To rename database objects
    ———————————————————-
    6) Data Manipulation Language

    Important Commands and Operations in Data Manipulation Language

    i) Select: To select specific data from a database

    ii) Insert: To insert new records in a table

    iii) Update: To update existing records

    iv) Delete: To delete existing records from a table
    ——————————————————–
    7) Data Control Language

    Important Commands and Operations in Data Control Language

    i) Grant: To provide access on the Database objects to the users

    ii) Revoke: to remove user access rights to the database objects

    iii) Deny: To deny permissions to users.
    —————————————————-

  2. I have a table call member and which has FName,DOB columns. I was able to get age from the DOB Now need to get AgeRange field based on following range(0-18,19-30,30-99) for my C# project. How do I achieve this in SQL

    "SELECT FName,DOB, TIMESTAMPDIFF(YEAR,DOB,CURDATE()) AS Age,Mobile FROM members"

    Please help me .

Leave a Reply