Notes Chapter 17 Simple Queries in SQL

Introduction

  • SQL was developed in 1970 in IBM lab. It is also known as SEQUEL which was a non-procedural language.
  • It always specifies that WHAT is required?
  • We can perform following tasks in SQLI.

Creation and modification of Database structure.
II. Change in security settings for system.
III. Giving permission to User to work with database or table
IV. Quering a Database .
V. Insertion/modification/deletion of data…… etc

Elements of MySQL

  • Main elements of MySQL are-
  • Literals
  • Datatypes
  • Nulls
  • Comments
  • Literals : generally known as fixed data value. It can be character, numeric or text literal.
  • Data Types : these are of following types-
    (i) Numeric : INT, TINYINT, SMALLINT, MEDIUMINT, FLOAT , DOUBLE etc
    (ii) Date and Time : DATE, DATETIME, TIME, YEAR etc
    (iii) String type : CHAR, VARCHAR, BLOB or TEXT TINYTEXT, ENUM etc

Elements of MySQL

  • NULL Values : if a column in a row has no value, then column is said to be null. NULL can appear in a column of any data type provided they are not restricted by NOT Null or Primary Key.
  • Comments : it is a text which does not execute. Comments are used only for documentation purpose. Three types of comments are-
  • /* comment */
  • — comment
  • # comment

SQL COMMAND SYNTAX

  • SQL provides a set of predefined commands.
  • SQL syntax has following elements-
  • Keyword:
  • Statements:
  • Clauses:
  • Arguments:
  • SQL commands are not case sensitive.
Notes Chapter 17 Simple Queries in SQL

Related Posts

error: Content is protected !!