Skillzam

SQL: Structured Query Language

SQL Home

Data & Information :

Data:

  • Data is raw, unprocessed & unorganized facts and statistics stored or free flowing over a network.
  • Data can be in various formats, including text, numbers, images, audio, and video.
  • Data can collected, stored, and used for analysis, processing, and decision-making.
  • Data can be structured, semi-structured, or unstructured.
    1.    ➤  Structured data is organized in a specific format, such as tables in a relational database, making it easy to search and analyze.
    2.    ➤  Semi-structured data contains some structure but also includes data that doesn't conform to a specific format.
    3.    ➤  Unstructured data, on the other hand, doesn't have any structure or format and is often difficult to search and analyze.
  • Data can come from a wide range of sources, including sensors, social media, e-commerce transactions, and more.
  • Data can be used for a variety of purposes, such as gaining insights into customer behavior, optimizing business processes, and developing new products and services.
  • "Datum" is the singular form of the word "data." It refers to a single unit of information or a single piece of data. For example, if you collect data on customer purchases, each purchase would be a datum.
  • Data is usually organized into structures such as tables that provide additional context and meaning, and which may themselves be used as data in larger structures.
  • Data may be used as variables in a computational process.
  • Data is measured in terms of bits and bytes - which are basic units of information in the context of computer storage and processing.
  • Types of Data

    Information:

  • Data becomes information when it is processed, organised and structured, thereby turning it into something meaningful.
  • Information provides context for data and enables informed decision making.
  • For example, if you collect data on customer behavior, such as the products they buy and the times they shop, you can use that data to generate information about their preferences and shopping patterns. This information can then be used to make decisions about product development, marketing strategies, and customer service.
  • Information can be presented in various formats, such as reports, dashboards, and visualizations. The format used depends on the intended audience and the purpose of the information.
  • For example, a financial report may use charts and graphs to present complex financial data in a way that is easy to understand for non-financial professionals.
  • Convert Data to Information :

    Data can be converted to information through a process of analysis and interpretation. This involves organizing, filtering, and processing the data to extract meaningful insights and patterns that can be used to make informed decisions.
    Here are some steps involved in converting data to information:

  • Data collection: The first step is to collect relevant data from various sources, such as customer feedback, sales reports, or social media analytics.
  • Data cleaning: Once the data is collected, it needs to be cleaned to remove any errors or inconsistencies. This involves identifying and correcting any missing, incomplete, or inaccurate data.
  • Data organization: The data then needs to be organized in a way that is meaningful and useful. This can involve categorizing data into different groups or creating a database with tables and fields that relate to each other.
  • Data analysis: The next step is to analyze the data to identify patterns and trends. This can involve using statistical methods, data mining techniques, or machine learning algorithms to identify correlations and insights.
  • Data visualization: Once the analysis is complete, the insights can be visualized in the form of charts, graphs, or other visual aids. This can help to communicate the insights more effectively and make it easier for decision-makers to understand.
  • Interpretation: Finally, the insights need to be interpreted in the context of the business or organization. This involves using the insights to make informed decisions, develop strategies, or improve processes.
  • DIKW Pyramid :

  • Data, information, knowledge, and wisdom are closely related concepts, but each has its role concerning the other, and each term has its meaning.
  • According to a common view, data is collected and analyzed; data only becomes information suitable for making decisions once it has been analyzed in some fashion.
  • One can say that the extent to which a set of data is informative to someone depends on the extent to which it is unexpected by that person.
  • The amount of information contained in a data stream may be characterized by its Shannon entropy.
  • Knowledge is the awareness of its environment that some entity possesses, whereas data merely communicate that knowledge.
  • Data is often assumed to be the least abstract concept, information the next least, and knowledge the most abstract.
  • For example: the entry in a database specifying the height of Mount Everest is a datum that communicates a precisely-measured value. This measurement may be included in a book along with other data on Mount Everest to describe the mountain in a manner useful for those who wish to decide on the best method to climb it. An awareness the characteristics represented by these data is knowledge.

  • KM Cognitive Pyramid

    DIKW pyramid

    Database

  • Database is a organized collection of inter-related data, which is used to retrieve, insert and delete the data efficiently.
  • It is also used to organize the data in the form of a table, schema, views, and reports, etc.
  • Using the database, you can easily retrieve, insert, and delete the information.
  • Databases are used in a wide variety of applications, including business management, scientific research, healthcare, e-commerce, and many others.
  • Databases can be as simple as a single spreadsheet or as complex as a large network of interconnected systems.
  • There are different types of databases, including relational databases, NoSQL databases, and graph databases, each designed to handle specific types of data and use cases.
  • The choice of database depends on the specific needs of the application and the type of data that needs to be stored and managed.

  • Example:

    Students Database organizes the data about the students, Courses, etc.
    Employee Database organizes the data about the employees, salary, department etc.

    DBMS - DataBase Management System

  • DBMS stands for DataBase Management System
  • Main purpose of DBMS is to manage the data.
  • DBMS is software that allows creation, definition and manipulation of database, allowing users to store, process and analyze data easily.
  • DBMS provides us with an interface or a tool, to perform various operations in the database, like creating, manipulating or deleting data.
  • DBMS also provides protection & security to the databases.
  • DBMS also maintains data consistency in case of multiple users.
  • Examples of DBMS:

    DBMS examples

  • POSTGRESQL: An open-source object-relational database management system (ORDBMS) that is known for its reliability and flexibility and is suitable for data analysis.
  • ORACLE MYSQL: An open-source relational database management system (RDBMS) that is widely used on the web and is suitable for data analysis
  • SQLITE: A lightweight, embedded RDBMS that is commonly used in mobile devices and web browsers and is good for data analysis.
  • MICROSOFT SQL SERVER: A RDBMS developed by Microsoft that is commonly used in Windows environments and is good for data analysis.
  • MONGODB: A NoSQL database that is designed to store large amounts of data in a flexible, JSON-like format and is often used for data analysis.
  • REDIS: An in-memory data store that is used for caching, real-time analytics, and message brokering and can be used for data analysis.
  • MARIADB: An open-source fork of MySQL that is designed to be highly reliable and scalable and is suitable for data analysis.
  • ELASTICSEARCH: A search and analytics engine that is used to index, search, and analyze large volumes of data quickly and is often used for data analysis.
  • ORACLE: A powerful, enterprise-class RDBMS that is used by many large organizations and is well-suited for data analysis.
  • FIREBASE: A NoSQL database that is designed for real-time data synchronization and offline support and can be used for data analysis.
  • ORACLE DATABASE: A powerful, enterprise-class RDBMS that is used by many large organizations and is suitable for data analysis.
  • CASSANDRA: A NoSQL database that is designed for high scalability and availability and is suitable for data analysis.
  • AMAZON AURORA: A cloud-native RDBMS that is designed for high performance and scalability and is often used for data analysis.
  • MICROSOFT ACCESS: A RDBMS that is commonly used for small-scale, standalone applications and is suitable for data analysis.
  • SNOWFLAKE: A cloud-based data warehouse that is designed for fast querying and analysis of large datasets.
  • IBM DB2: A powerful RDBMS that is used by many large organizations, particularly in the financial and healthcare industries, and is suitable for data analysis.
  • AMAZON REDSHIFT: A cloud-based data warehouse that is designed for fast querying and analysis of large datasets.
  • NEO4J: A graph database that is used to store and query data that is represented in the form of relationships and can be used for data analysis.
  • BIGQUERY: A cloud-native, fully managed data warehouse that is designed for fast querying and analysis of large and complex datasets.
  • HBASE: A NoSQL database that is designed for storing large amounts of data in a distributed environment and is suitable for data analysis.
  • COUCHBASE: A NoSQL database that is designed for flexibility and scalability and can be used for data analysis.
  • INFLUXDB: A time series database that is used to store and query large volumes of data with high performance and is often used for data analysis.
  • MEMCACHED: An in-memory cache that is used to speed up web applications by storing frequently accessed data and is suitable for data analysis.

  • Stack Overflow Survey 2022: Database environments that professional developers have done extensive development work in over the past year, and they want to work in over the next year.

    DBMS stackoverflow

    History of DBMS

  • The concept of a database was made possible by the emergence of direct access storage media such as magnetic disks, which became widely available in the mid-1960s; earlier systems relied on sequential storage of data on magnetic tape.
  • Hierarchical databases: In the early days of computing, the first DBMSs were hierarchical in nature. These databases stored data in a tree-like structure, with parent-child relationships between records.
  • Network databases: In the late 1960s and early 1970s, network databases were developed. These databases allowed for more complex relationships between records, using a network-like structure. This allowed for more flexible data retrieval.
  • Relational databases: In 1970, Edgar F. Codd introduced the concept of the relational database. This revolutionary approach allowed data to be stored in tables with rows and columns, with relationships between tables established using common fields. This made it easier to query and manipulate data, and the concept quickly gained popularity.
  • SQL: In the late 1970s and early 1980s, several companies developed their own versions of SQL, each with its own syntax and features. In response, the American National Standards Institute (ANSI) formed a committee to develop a standard version of SQL. The first SQL standard was published in 1986, with subsequent revisions in 1989, 1992, 1999, 2003, 2008, and 2011. SQL became the standard language for interacting with databases, and it is still widely used today.
  • Object-oriented databases: In the 1990s, object-oriented databases were developed. These databases stored data in objects, which allowed for more complex relationships between records and better support for multimedia data.
  • NoSQL databases: In the 2000s, NoSQL (Not Only SQL) databases were developed. These databases are designed to handle large amounts of unstructured and semi-structured data, such as social media data or sensor data. NoSQL databases use a variety of data models, including document-oriented, key-value, and graph databases.
  • Applications of DBMS

    DBMSs are used to store, manage, and retrieve data, and to provide quick and easy access to data for decision-making, analysis, and reporting purposes.

  • Business applications: DBMSs are used extensively in business applications, such as customer relationship management (CRM), inventory management, and human resource management. DBMSs are used to store and retrieve data related to customers, products, orders, employees, and other business entities.
  • Web applications: DBMSs are used in web applications to store and retrieve data, such as user information, product information, and transaction details. Examples of web applications that use DBMSs include online shopping sites, social media sites, and banking applications.
  • Scientific applications: DBMSs are used in scientific applications to store and manage large volumes of data, such as weather data, environmental data, and astronomical data. DBMSs are used to store and retrieve data, perform data analysis, and generate reports.
  • Government applications: DBMSs are used in government applications to store and manage data related to citizens, businesses, and other entities. Examples include tax databases, voter registration databases, and land records databases.
  • Educational applications: DBMSs are used in educational applications to store and manage student information, such as grades, attendance, and course registration. DBMSs are also used to manage library collections, research data, and administrative data.
  • Healthcare applications: DBMSs are used in healthcare applications to store and manage patient information, such as medical history, test results, and treatment plans. DBMSs are used to provide healthcare providers with quick and easy access to patient data, and to generate reports for medical research and public health initiatives.
  • Telecom: There is a database to keeps track of the information regarding calls made, network usage, customer details etc.
  • Airlines: To travel though airlines, we make early reservations; this reservation information along with flight schedule is stored in database.
  • Banking System: For storing customer info, tracking day to day credit and debit transactions, generating bank statements etc.
  • Characteristics of DBMS

  • Data stored into Tables: Data is never directly stored into the database. Data is stored into tables, created inside the database.
  • Data independence: DBMS provides a level of abstraction that separates the physical storage of data from the way it is presented to users. This means that changes to the physical storage structure of the database do not affect the way data is accessed or manipulated.
  • Concurrent access: Multiple users can access a DBMS simultaneously, and the system ensures that transactions are executed in a consistent and reliable manner. This allows for efficient and reliable access to the data.
  • Security: DBMSs provide security mechanisms to prevent unauthorized access to the database. These mechanisms include authentication, access control, and encryption.
  • Data consistency and integrity: DBMSs enforce rules and constraints to ensure that data stored in the database is consistent and valid. This includes enforcing data types, checking for duplicates, and ensuring that data relationships are maintained.
  • Query Language: DBMS provides users with a Structured Query language - SQL, using which data can be easily fetched, inserted, deleted and updated in a database.
  • Scalability: DBMSs are designed to scale to handle large volumes of data and large numbers of users. This includes support for distributed databases, replication, and partitioning.
  • Backup and recovery: DBMSs provide mechanisms for backing up and recovering data in case of system failures or disasters.
  • Performance tuning: DBMSs provide tools and mechanisms for optimizing the performance of database operations. This includes indexing, caching, and query optimization.
  • Data Abstraction in DBMS

    Data abstraction is a fundamental concept in DBMS (Database Management System) that refers to the process of hiding the complexity of the data stored in a database from the end-user. It provides a level of abstraction that allows users to interact with the data without having to understand its underlying complexity.

    There are three levels of data abstraction in DBMS:

  • Physical level: The physical level is the lowest level of data abstraction, and it deals with the actual storage and organization of data on the physical storage media, such as hard disks. This level defines the physical layout of data, including the data types, record formats, and storage mechanisms.
  • Logical level: The logical level is the next level of data abstraction, and it deals with the way data is organized and presented to users. This level defines the logical structure of the database, including tables, fields, relationships, and constraints. It provides a conceptual view of the data that is independent of the physical storage details.
  • View level: The view level is the highest level of data abstraction, and it deals with the way data is presented to different users and applications. This level provides a customized view of the data to each user or group of users, depending on their specific needs and preferences. Views can be used to hide certain aspects of the data, such as sensitive information or complex data relationships, from users who do not need to see them.
  • Data Abstraction

    Data Modelling

    Define Data Modeling

  • Data modeling is the process of creating a visual representation of either a whole information system or parts of it to communicate connections between data points and structures.
  • The goal is to illustrate the types of data used and stored within the system, the relationships among these data types, the ways the data can be grouped and organized and its formats and attributes.
  • Data models are built around business needs. Rules and requirements are defined upfront through feedback from business stakeholders so they can be incorporated into the design of a new system or adapted in the iteration of an existing one.
  • Data can be modeled at various levels of abstraction. The process begins by collecting information about business requirements from stakeholders and end users. These business rules are then translated into data structures to formulate a concrete database design. A data model can be compared to a roadmap, an architect’s blueprint or any formal diagram that facilitates a deeper understanding of what is being designed.
  • Data modeling employs standardized schemas and formal techniques. This provides a common, consistent, and predictable way of defining and managing data resources across an organization, or even beyond.
  • Ideally, data models are living documents that evolve along with changing business needs. They play an important role in supporting business processes and planning IT architecture and strategy. Data models can be shared with vendors, partners, and/or industry peers.
  • Types of data models

    Like any design process, database and information system design begins at a high level of abstraction and becomes increasingly more concrete and specific. Data models can generally be divided into three categories, which vary according to their degree of abstraction. The process will start with a conceptual model, progress to a logical model and conclude with a physical model. Each type of data model is discussed in more detail below:

  • Conceptual data models: They are also referred to as domain models and offer a big-picture view of what the system will contain, how it will be organized, and which business rules are involved. Conceptual models are usually created as part of the process of gathering initial project requirements. Typically, they include entity classes (defining the types of things that are important for the business to represent in the data model), their characteristics and constraints, the relationships between them and relevant security and data integrity requirements. Any notation is typically simple.
  • Logical data models: They are less abstract and provide greater detail about the concepts and relationships in the domain under consideration. One of several formal data modeling notation systems is followed. These indicate data attributes, such as data types and their corresponding lengths, and show the relationships among entities. Logical data models don’t specify any technical system requirements. This stage is frequently omitted in agile or DevOps practices. Logical data models can be useful in highly procedural implementation environments, or for projects that are data-oriented by nature, such as data warehouse design or reporting system development.
  • Physical data models: They provide a schema for how the data will be physically stored within a database. As such, they’re the least abstract of all. They offer a finalized design that can be implemented as a relational database, including associative tables that illustrate the relationships among entities as well as the primary keys and foreign keys that will be used to maintain those relationships. Physical data models can include database management system (DBMS)-specific properties, including performance tuning.
  • Data modeling process

    As a discipline, data modeling invites stakeholders to evaluate data processing and storage in painstaking detail. Data modeling techniques have different conventions that dictate which symbols are used to represent the data, how models are laid out, and how business requirements are conveyed. All approaches provide formalized workflows that include a sequence of tasks to be performed in an iterative manner. Those workflows generally look like this:

    1. 1. Identify the entities: The process of data modeling begins with the identification of the things, events or concepts that are represented in the data set that is to be modeled. Each entity should be cohesive and logically discrete from all others.
    2. 2. Identify key properties of each entity: Each entity type can be differentiated from all others because it has one or more unique properties, called attributes. For instance, an entity called “customer” might possess such attributes as a first name, last name, telephone number and salutation, while an entity called “address” might include a street name and number, a city, state, country and zip code.
    3. 3. Identify relationships among entities: The earliest draft of a data model will specify the nature of the relationships each entity has with the others. In the above example, each customer “lives at” an address. If that model were expanded to include an entity called “orders,” each order would be shipped to and billed to an address as well. These relationships are usually documented via unified modeling language (UML).
    4. 4. Map attributes to entities completely: This will ensure the model reflects how the business will use the data. Several formal data modeling patterns are in widespread use. Object-oriented developers often apply analysis patterns or design patterns, while stakeholders from other business domains may turn to other patterns.
    5. 5. Assign keys as needed, and decide on a degree of normalization that balances the need to reduce redundancy with performance requirements: Normalization is a technique for organizing data models (and the databases they represent) in which numerical identifiers, called keys, are assigned to groups of data to represent relationships between them without repeating the data. For instance, if customers are each assigned a key, that key can be linked to both their address and their order history without having to repeat this information in the table of customer names. Normalization tends to reduce the amount of storage space a database will require, but it can at cost to query performance.
    6. 6. Finalize and validate the data model: Data modeling is an iterative process that should be repeated and refined as business needs change.

    Types of data modeling

    Data modeling has evolved alongside database management systems, with model types increasing in complexity as businesses' data storage needs have grown. Here are several model types:

  • Hierarchical data models: represent one-to-many relationships in a treelike format. In this type of model, each record has a single root or parent which maps to one or more child tables. This model was implemented in the IBM Information Management System (IMS), which was introduced in 1966 and rapidly found widespread use, especially in banking. Though this approach is less efficient than more recently developed database models, it's still used in Extensible Markup Language (XML) systems and geographic information systems (GISs).
  • Hierarchical
  • Network Data Model: allows each child to have multiple parents. It helps you to address the need to model more complex relationships like as the orders/parts many-to-many relationship. In this model, entities are organized in a graph which can be accessed through several paths. Example: Ingres Database, TurboIMAGE, Univac DMS-1100.
  • Network
  • Relational data models: were initially proposed by IBM researcher E.F. Codd in 1970. They are still implemented today in the many different relational databases commonly used in enterprise computing. Relational data modeling doesn't require a detailed understanding of the physical properties of the data storage being used. In it, data segments are explicitly joined through the use of tables, reducing database complexity. Relational databases frequently employ structured query language (SQL) for data management. These databases work well for maintaining data integrity and minimizing redundancy
  • Relational
  • Entity-relationship (ER) data models: use formal diagrams to represent the relationships between entities in a database. Several ER modeling tools are used by data architects to create visual maps that convey database design objectives.
  • Entity-relationship
  • Object-oriented data models: gained traction as object-oriented programming and it became popular in the mid-1990s. The “objects” involved are abstractions of real-world entities. Objects are grouped in class hierarchies, and have associated features. Object-oriented databases can incorporate tables, but can also support more complex data relationships. This approach is employed in multimedia and hypertext databases as well as other use cases.
  • Dimensional data models: were developed by Ralph Kimball, and they were designed to optimize data retrieval speeds for analytic purposes in a data warehouse. While relational and ER models emphasize efficient storage, dimensional models increase redundancy in order to make it easier to locate information for reporting and retrieval. This modeling is typically used across OLAP (online analytical processing) systems.
    Two popular dimensional data models are the star schema, in which data is organized into facts (measurable items) and dimensions (reference information), where each fact is surrounded by its associated dimensions in a star-like pattern. The other is the snowflake schema, which resembles the star schema but includes additional layers of associated dimensions, making the branching pattern more complex.
  • Benefits of data modeling

    Data modeling makes it easier for developers, data architects, business analysts, and other stakeholders to view and understand relationships among the data in a database or data warehouse. In addition, it can:

  • Reduce errors in software and database development.
  • Increase consistency in documentation and system design across the enterprise.
  • Improve application and database performance.
  • Ease data mapping throughout the organization.
  • Improve communication between developers and business intelligence teams.
  • Ease and speed the process of database design at the conceptual, logical and physical levels.
  • ER Diagram

    What is an ER diagram?

  • An Entity Relationship (ER) Diagram is a type of flowchart that illustrates how “entities” such as people, objects or concepts relate to each other within a system.
  • ER Diagrams are most often used to design or debug relational databases in the fields of software engineering, business information systems, education and research.
  • Also known as ERDs or ER Models, they use a defined set of symbols such as rectangles, diamonds, ovals and connecting lines to depict the interconnectedness of entities, relationships and their attributes.
  • They mirror grammatical structure, with entities as nouns and relationships as verbs.
  • ER diagrams are related to data structure diagrams (DSDs), which focus on the relationships of elements within entities instead of relationships between entities themselves.
  • ER diagrams also are often used in conjunction with data flow diagrams (DFDs), which map out the flow of information for processes or systems.
  • History of ERD: Peter Chen (a.k.a. Peter Pin-Shan Chen), currently a faculty member at Carnegie-Mellon University in Pittsburgh, is credited with developing ER modeling for database design in the 1970s.
  • Uses of ER Diagrams

  • Database design: ER diagrams are used to model and design relational databases, in terms of logic and business rules (in a logical data model) and in terms of the specific technology to be implemented (in a physical data model.) In software engineering, an ER diagram is often an initial step in determining requirements for an information systems project. It's also later used to model a particular database or databases. A relational database has an equivalent relational table and can potentially be expressed that way as needed.
  • Database troubleshooting: ER diagrams are used to analyze existing databases to find and resolve problems in logic or deployment. Drawing the diagram should reveal where it's going wrong.
  • Business information systems: The diagrams are used to design or analyze relational databases used in business processes. Any business process that uses fielded data involving entities, actions and interplay can potentially benefit from a relational database. It can streamline processes, uncover information more easily and improve results.
  • Business process re-engineering (BPR): ER diagrams help in analyzing databases used in business process re-engineering and in modeling a new database setup.
  • Education: Databases are today's method of storing relational information for educational purposes and later retrieval, so ER Diagrams can be valuable in planning those data structures.
  • Research: Since so much research focuses on structured data, ER diagrams can play a key role in setting up useful databases to analyze the data.
  • Components and features of ERD

    Entity:

    definable thing—such as a person, object, concept or event—that can have data stored about it. Think of entities as nouns. Examples: a customer, student, car or product. Typically shown as a rectangle.

  • Entity type: A group of definable things, such as students or athletes, whereas the entity would be the specific student or athlete. Other examples: customers, cars or products.
  • Entity set: Same as an entity type, but defined at a particular point in time, such as students enrolled in a class on the first day. Other examples: Customers who purchased last month, cars currently registered in Florida. A related term is instance, in which the specific person or car would be an instance of the entity set.
  • Entity categories: Entities are categorized as strong, weak or associative. A strong entity can be defined solely by its own attributes, while a weak entity cannot. An associative entity associates entities (or elements) within an entity set.
  • Entity keys: Refers to an attribute that uniquely defines an entity in an entity set. Entity keys can be super, candidate or primary. Super key: A set of attributes (one or more) that together define an entity in an entity set. Candidate key: A minimal super key, meaning it has the least possible number of attributes to still be a super key. An entity set may have more than one candidate key. Primary key: A candidate key chosen by the database designer to uniquely identify the entity set. Foreign key: Identifies the relationship between entities.

  • Relationship:

  • How entities act upon each other or are associated with each other.
  • Think of relationships as verbs. For example, the named student might register for a course.
  • The two entities would be the student and the course, and the relationship depicted is the act of enrolling, connecting the two entities in that way.
  • Relationships are typically shown as diamonds or labels directly on the connecting lines.
  • Recursive relationship: The same entity participates more than once in the relationship.

  • Attribute:

    A property or characteristic of an entity. Often shown as an oval or circle.

  • Descriptive attribute: A property or characteristic of a relationship (versus of an entity.)
  • Attribute categories: Attributes are categorized as simple, composite, derived, as well as single-value or multi-value. Simple: Means the attribute value is atomic and can't be further divided, such as a phone number.
  • Composite: Sub-attributes spring from an attribute. Derived: Attributed is calculated or otherwise derived from another attribute, such as age from a birthdate.
  • Multi-value: More than one attribute value is denoted, such as multiple phone numbers for a person.
  • Single-value: Just one attribute value. The types can be combined, such as: simple single-value attributes or composite multi-value attributes.

  • Cardinality:

  • Defines the numerical attributes of the relationship between two entities or entity sets.
  • The three main cardinal relationships are one-to-one, one-to-many, and many-many.
    • A one-to-one example would be one student associated with one mailing address.
    • A one-to-many example (or many-to-one, depending on the relationship direction): One student registers for multiple courses, but all those courses have a single line back to that one student.
    • Many-to-many example: Students as a group are associated with multiple faculty members, and faculty members in turn are associated with multiple students.
  • Cardinality views: Cardinality can be shown as look-across or same-side, depending on where the symbols are shown.
  • Cardinality constraints: The minimum or maximum numbers that apply to a relationship.
  • ERD symbols and notations

    Chen notation style:

    chen Notation 1
    chen Notation 2
    chen Notation 3


    Crow's Foot/Martin/Information Engineering style:

    crows Martin 01


    IDEF1X style:

    IDEF1X Style


    Barker style:

    bakers Style

    Examples: Following are examples of ERD diagrams made in each system.



    example01 Style
    example02 Style

    Mapping natural language

    ER components can be equated to parts of speech, as Peter Chen did. This shows how an ER Diagram compares to a grammar diagram:

  • Common noun: Entity type. Example: student.
  • Proper noun: Entity. Example: Sally Smith.
  • Verb: Relationship type. Example: Enrolls. (Such as in a course, which would be another entity type.)
  • Adjective: Attribute for entity. Example: sophomore.
  • Adverb: Attribute for relationship. Example: digitally.
  • Limitations of ER diagrams and models

  • Only for relational data: Understand that the purpose is to show relationships. ER diagrams show only that relational structure.
  • Not for unstructured data: Unless the data is cleanly delineated into different fields, rows or columns, ER diagrams are probably of limited use. The same is true of semi-structured data, because only some of the data will be useful.
  • Difficulty integrating with an existing database: Using ER Models to integrate with an existing database can be a challenge because of the different architectures.
  • How to draw ERD

  • Purpose and scope: Define the purpose and scope of what you're analyzing or modeling.
  • Entities: Identify the entities that are involved. When you're ready, start drawing them in rectangles (or your system's choice of shape) and labeling them as nouns.
  • Relationships: Determine how the entities are all related. Draw lines between them to signify the relationships and label them. Some entities may not be related, and that’s fine. In different notation systems, the relationship could be labeled in a diamond, another rectangle or directly on top of the connecting line.
  • Attributes: Layer in more detail by adding key attributes of entities. Attributes are often shown as ovals.
  • Cardinality: Show whether the relationship is 1-1, 1-many or many-to-many.
  • SQL Database Setup

    For the learning of SQL through this Skillzam Notes, Please Setup the Database and Tables, based on the below mentioned details:

  • [I]. Firstly, create the database called company and create the five tables employee, customer, branch, empAssignment, vendor
  • [II]. Secondly, load tables with data.


  • Create the Database & Tables

    1. Create database "company"

    
    CREATE DATABASE company;
    
    

    2. Create Table "employee"

    
    -- Table "employee"
    
    CREATE TABLE employee (
    	emp_id INT PRIMARY KEY IDENTITY(10000,1),
    	firstname VARCHAR(32) NOT NULL,
    	lastname VARCHAR(32) NOT NULL,
    	doj DATE NOT NULL,
    	designation VARCHAR(32),
    	gender VARCHAR(6) NOT NULL,
    	salary INT,
    	lead_id INT,
    	branch_id INT 
    );
    
    

    3. Create Table "branch"

    
    -- Table "branch"
    
    CREATE TABLE branch (
    	branch_id INT PRIMARY KEY,
    	branch_name VARCHAR(32) NOT NULL,
    	hob_id INT,
    	head_count INT,
    	FOREIGN KEY(hob_id)
    	REFERENCES employee(emp_id)
    	ON DELETE SET NULL
    );
    
    

    4. Add foreign key "branch_id"

    
    -- Using ALTER, add foreign key "branch_id" in table "employee"
    
    ALTER TABLE employee
    ADD FOREIGN KEY(branch_id)
    REFERENCES branch(branch_id)
    ON DELETE SET NULL;
    
    

    5. Create Table "customer"

    
    -- Table "customer"
    
    CREATE TABLE customer (
      customer_id INT PRIMARY KEY,
      customer_name VARCHAR(32) NOT NULL,
      branch_id INT,
      FOREIGN KEY(branch_id) 
      REFERENCES branch(branch_id) 
      ON DELETE SET NULL
    );
    
    

    6. Create Table "empAssignment""

    
    -- Table "empAssignment"
    
    CREATE TABLE empAssignment (
      emp_id INT,
      customer_id INT,
      total_sales INT,
      PRIMARY KEY(emp_id, customer_id),
      FOREIGN KEY(emp_id) REFERENCES employee(emp_id) ON DELETE CASCADE,
      FOREIGN KEY(customer_id) REFERENCES customer(customer_id) ON DELETE CASCADE
    );
    
    

    7. Create Table "vendor"

    
    -- Table "vendor"
    
    CREATE TABLE vendor (
      branch_id INT,
      vendor_name VARCHAR(32),
      supply_type VARCHAR(32),
      PRIMARY KEY(branch_id, vendor_name),
      FOREIGN KEY(branch_id) 
      REFERENCES branch(branch_id) 
      ON DELETE CASCADE
    );
    
    


    Load tables with data

    1. Insert Rows into table "employee"

    
    -- Insert 10 Rows into table "employee"
    
    INSERT INTO employee VALUES ('Rohit', 'Patil', '2000-10-20', 'CEO', 'MALE', 11000000, NULL, NULL);
    INSERT INTO employee VALUES ('Fatima', 'Abdul', '2011-06-12', 'VP-IT', 'FEMALE', 5500000, 10000, NULL);
    INSERT INTO employee VALUES('Sandeep', 'Shetty', '2020-09-11', 'Sr-Director', 'MALE', 4500000, 10001, NULL);
    INSERT INTO employee VALUES('Mahesh', 'Dodamani', '2021-10-23', 'Sr-Director', 'MALE', 4000000, 10001, NULL);
    INSERT INTO employee VALUES ('Pooja', 'Reddy', '2013-11-21', 'Sr-Developer', 'FEMALE', 3300000, 10002, NULL);
    INSERT INTO employee VALUES ('John', 'Smith', '2014-09-12', 'Developer', 'MALE', 3000000, 10002, NULL);
    INSERT INTO employee VALUES ('Sambit', 'Ramana', '2015-10-20', 'QA', 'MALE', 2500000, 10002, NULL);
    INSERT INTO employee VALUES ('Mohammad', 'Irfan', '2011-06-12', 'Sr-Developer', 'MALE', 3500000, 10003, NULL);
    INSERT INTO employee VALUES ('Varun', 'Naidu', '2016-10-20', 'Sr-Developer', 'MALE', 3600000, 10003, NULL);
    INSERT INTO employee VALUES ('Ritu', 'Gupta', '2011-08-11', 'Developer', 'FEMALE', 2200000, 10003, NULL);
              
    

    2. Insert Rows into table "branch"

    
    -- Insert 3 Rows into table "branch"
    
    INSERT INTO branch VALUES (101, 'HeadOffice', 10000, NULL);
    INSERT INTO branch VALUES (102, 'Pune', 10002, NULL);
    INSERT INTO branch VALUES (103, 'Hyderabad', 10003, NULL);
    
    

    3. Update "employee" table & assign "branch_id"

    
    -- Update "employee" table  
    
    UPDATE employee
    SET branch_id = 101
    WHERE emp_id IN (10000, 10001);
    
    UPDATE employee
    SET branch_id = 102
    WHERE emp_id = 10002 OR lead_id = 10002;
    
    UPDATE employee
    SET branch_id = 103
    WHERE emp_id = 10003 OR lead_id = 10003;
              
    

    4. Insert Rows into table "vendor"

    
    -- Insert 6 Rows into table "vendor"
    
    INSERT INTO vendor VALUES(102, 'Kokuyo Camlin', 'Paper');
    INSERT INTO vendor VALUES(102, 'Hindustan Pencils', 'Pencils');
    INSERT INTO vendor VALUES(103, 'Kokuyo Camlin', 'Paper');
    INSERT INTO vendor VALUES(102, 'Archies', 'Writing Pads');
    INSERT INTO vendor VALUES(103, 'Navneet', 'Pens');
    INSERT INTO vendor VALUES(103, 'Hindustan Pencils', 'Pencils');
    
    

    5. Insert Rows into table "customer"

    
    -- Insert 6 Rows into table "customer"
    
    INSERT INTO customer VALUES(501, 'Cisco', 102);
    INSERT INTO customer VALUES(502, 'FedEX', 102);
    INSERT INTO customer VALUES(503, 'Walmart', 103);
    INSERT INTO customer VALUES(504, 'AT&T', 103);
    INSERT INTO customer VALUES(505, 'Apple', 102);
    INSERT INTO customer VALUES(506, 'Meta', 103);
              
    

    6. Insert Rows into table "empAssignment"

    
    -- Insert 8 Rows into table "empAssignment"
    
    INSERT INTO empAssignment VALUES(10002, 501, 55000);
    INSERT INTO empAssignment VALUES(10004, 502, 267000);
    INSERT INTO empAssignment VALUES(10005, 505, 22500);
    INSERT INTO empAssignment VALUES(10006, 505, 5000);
    INSERT INTO empAssignment VALUES(10003, 503, 15000);
    INSERT INTO empAssignment VALUES(10007, 504, 12000);
    INSERT INTO empAssignment VALUES(10008, 506, 33000);
    INSERT INTO empAssignment VALUES(10009, 506, 26000);
              
    

    SQL - Structured Query Language

  • SQL (Structured Query Language) is a programming language that is used to manage and manipulate relational databases.
  • SQL is the standard programming language for interacting with relational database management systems, allowing users to add, update, or delete rows of data easily.
  • The scope of SQL includes data query, data manipulation (insert, update, and delete), data definition (schema creation and modification), and data access control.
  • SQL is a standard language used by most relational database management systems (RDBMS), including PostgreSQL, MySQL, Microsoft SQL Server, Oracle, SQLite etc.
  • SQL is a set-based, declarative programming language, not an imperative programming language like C or BASIC. However, extensions to Standard SQL add procedural programming language functionality, such as control-of-flow constructs.
  • SQL was one of the first commercial languages to use Edgar F. Codd's relational model. The model was described in his influential 1970 paper, "A Relational Model of Data for Large Shared Data Banks".
  • SQL became a standard of the American National Standards Institute (ANSI) in 1986 and of the International Organization for Standardization (ISO) in 1987.
  • Structure query language is not case sensitive. Generally, keywords of SQL are written in uppercase.
  • Statements of SQL are dependent on text lines. We can use a single SQL statement on one or multiple text line.
  • Using the SQL statements, you can perform most of the actions in a database.
  • SQL depends on tuple relational calculus and relational algebra.
  • History of SQL

  • 1970 - Dr. Edgar F. "Ted" Codd of IBM is known as the father of relational databases. He described a relational model for databases.
  • 1974 - Structured Query Language invented by Don Chamberlin and Ray Boyce at IBM.
  • 1978 - IBM worked to develop Codd's ideas and released a product named System/R.
  • 1986 - IBM developed the first prototype of relational database and standardized by ANSI.
  • The first relational database was released by Relational Software and its later becoming Oracle.
  • Database Languages

    Database Languages

    SQL can do many different things: create database tables, insert or change records, add indexes, retrieve information, and so on. So it can be useful to divide SQL into several sublanguages; this helps us wrap our heads around all the different operations that can be performed on an SQL database. These sublanguages are:

  • Data Definition Language (DDL): commands are also called data definition commands because they are used to define data tables.
  • Data Manipulation Language (DML): commands are used to manipulate data in existing tables by adding, changing or removing data. Unlike DDL commands that define how data is stored, DML commands operate in the tables defined with DDL commands.
  • Data Control Language (DCL): commands are used to GRANT or REVOKE user access privileges.
  • Transaction Control Language (TCL): commands are used to change the state of some data - for example, to COMMIT transaction changes or to ROLLBACK transaction changes.
  • Data Query Language (DQL): consists of just one command, SELECT used to get specific data from tables.
  • Anatomy of SQL Query

    SQL Anatomy

    The SQL language is subdivided into several language elements, including:

  • Keywords: are words that are defined in the SQL language. They are either reserved (e.g. SELECT, COUNT and YEAR ), or non-reserved (e.g. ASC, DOMAIN and KEY).
  • Identifiers: are names on database objects, like tables, columns and schemas. An identifier may not be equal to a reserved keyword, unless it is a delimited identifier. Delimited identifiers means identifiers enclosed in double quotation marks. They can contain characters normally not supported in SQL identifiers, and they can be identical to a reserved word, e.g. a column named YEAR is specified as "YEAR".
    NOTE: In MySQL, double quotes are string literal delimiters by default instead.
  • Clauses: which are constituent components of statements and queries. (In some cases, these are optional.)
  • Expressions: which can produce either scalar values, or tables consisting of columns and rows of data.
  • Predicates: which specify conditions that can be evaluated to SQL three-valued logic (3VL) (true/false/unknown) or Boolean truth values and are used to limit the effects of statements and queries, or to change program flow.
  • Queries: which retrieve the data based on specific criteria. This is an important element of SQL.
  • Statements: which may have a persistent effect on schemata and data, or may control transactions, program flow, connections, sessions, or diagnostics.
    SQL statements also include the semicolon (";") statement terminator. Though not required on every platform, it is defined as a standard part of the SQL grammar.
  • Insignificant whitespace: is generally ignored in SQL statements and queries, making it easier to format SQL code for readability.
  • SQL Query Execution process

    To process an SQL statement, a DBMS performs the following five steps:

  • Parse Statement: The DBMS first parses the SQL statement. It breaks the statement up into individual words, called tokens, makes sure that the statement has a valid verb and valid clauses, and so on. Syntax errors and misspellings can be detected in this step.
  • Validate Statement: The DBMS validates the statement. It checks the statement against the system catalog. Do all the tables named in the statement exist in the database? Do all of the columns exist and are the column names unambiguous? Does the user have the required privileges to execute the statement? Certain semantic errors can be detected in this step.
  • Generate Access Plan: The DBMS generates an access plan for the statement. The access plan is a binary representation of the steps that are required to carry out the statement; it is the DBMS equivalent of executable code.
  • Optimize Statement: The DBMS optimizes the access plan. It explores various ways to carry out the access plan. Can an index be used to speed a search? Should the DBMS first apply a search condition to Table A and then join it to Table B, or should it begin with the join and use the search condition afterward? Can a sequential search through a table be avoided or reduced to a subset of the table? After exploring the alternatives, the DBMS chooses one of them.
  • Execute Access Plan: The DBMS executes the statement by running the access plan.
  • The steps used to process an SQL statement vary in the amount of database access they require and the amount of time they take. Parsing an SQL statement does not require access to the database and can be done very quickly. Optimization, on the other hand, is a very CPU-intensive process and requires access to the system catalog. For a complex, multitable query, the optimizer may explore thousands of different ways of carrying out the same query. However, the cost of executing the query inefficiently is usually so high that the time spent in optimization is more than regained in increased query execution speed. This is even more significant if the same optimized access plan can be used over and over to perform repetitive queries.

    SQL Process

    Comments in SQL

    Standard SQL allows two formats for comments:

  • -- comment which is ended by the first newline
  • /* comment */ which can span multiple lines.
  • 
    --  Comment in SQL
    
    /*
    This is a 
    multi-line comment in SQL
    */
              
    

    Define & Modify Data

    1. Create Database

  • CREATE DATABASE statement is used to create a new SQL database.
  • Make sure you have admin privileges before creating any database.
  • List the databases with the command SHOW DATABASES;


  • EXAMPLE:Below example will create the database named company

    
    CREATE DATABASE company;
     
    

    2. Create Table

  • Tables are used to store data in the database.
  • Tables are uniquely named within a database and schema.
  • Each table contains one or more columns. And each column has an associated data type that defines the kind of data it can store e.g., numbers, strings, or temporal data.
  • CREATE TABLE statement is used to create a new table in a database.


  • create "employee" table

    
    -- Create "employee" entity(table) with nine attributes(columns)
    
    CREATE TABLE employee (
    	emp_id INT PRIMARY KEY IDENTITY(10000,1),
    	firstname VARCHAR(32) NOT NULL,
    	lastname VARCHAR(32) NOT NULL,
    	doj DATE NOT NULL,
    	designation VARCHAR(32),
    	gender VARCHAR(6) NOT NULL,
    	salary INT,
    	lead_id INT,
    	branch_id INT 
    );
    
    

    EXAMPLE: In the above example, the employee table contains nine columns:

  • emp_id column is the primary key column of the table. The IDENTITY(10000,1) instructs SQL Server to automatically generate integer numbers for the column starting from 10000 and increasing by one for each new row.
  • firstname and lastname columns are character string columns with VARCHAR type. These columns can store up to 32 characters.
  • doj column that records the literal string format of a DATE in format YYYYMMDD. This column represents the date of joining of an employee.
  • designation column is character string column with VARCHAR type. This column can store up to 32 characters and can accept the NULL
  • gender column is character string column with VARCHAR type. This column can store up to 6 characters and can not accept the NULL
  • salary, lead_id and branch_id are integer columns with INT type.
  • 3. Alter Table

  • ALTER TABLE statement is used to add, delete, or modify columns in an existing table.
  • It is also used to add and drop various constraints on an existing table.

  • EXAMPLE: Below example will alter the table named employee by adding a foreign key:

  • foreign key is a column or a group of columns in one table that uniquely identifies a row of another table (or the same table in case of self-reference).
  • To create a foreign key, you use the FOREIGN KEY constraint.
  • In the example below, branch is a parent table that is the table to which the foreign key constraint references.
  • The employee table is called the child table that is the table to which the foreign key branch_id constraint is applied.
  • If a foreign key constraint is defined with the ON DELETE SET NULL clause, it means that when the referenced record in the parent table is deleted, the corresponding foreign key value in the child table will be set to NULL. This can be useful when you want to allow a child record to exist without a corresponding parent record, or when you want to break a relationship between two tables without deleting any data.
  • 
    -- Alter table "employee" by adding a foreign key constraint
    
    ALTER TABLE employee
    ADD FOREIGN KEY(branch_id)
    REFERENCES branch(branch_id)
    ON DELETE SET NULL;
    
    

    4. Insert into table

  • INSERT INTO is a SQL statement used to insert new data into a table in a database
  • To add one or more rows into a table, you use the INSERT statement
  • If you are adding values for all the columns of the table, you do not need to specify the column names.
  • SYNTAX:
  • 
    INSERT INTO table_name (column1, column2, column3, ...)
    VALUES (value1, value2, value3, ...);
                
    
  • In the above syntax, "table_name" is the name of the table where the data will be inserted, and "column1, column2, column3, ..." are the names of the columns in the table.
  • The VALUES keyword is used to specify the values that will be inserted into each column.
  • The values must be listed in the same order as the columns, and each value must be of the correct data type for the column.
  • Note that the INSERT INTO statement can also be used with subqueries to insert data into a table based on the results of a query, and it can be used to insert multiple records at once by specifying multiple sets of values in the VALUES clause.

  • EXAMPLE: Add table rows for both tables "employee" and "branch".

    
    -- Insert row into table "employee" 
    
    INSERT INTO employee 
    VALUES ('Rohit', 'Patil', '2000-10-20', 'CEO', 'MALE', 11000000, NULL, NULL); 
      
    
    
    -- Insert three rows in table "branch" using single INSERT statement
    
    INSERT INTO branch 
    VALUES 
      (101, 'HeadOffice', 10000, NULL),
      (102, 'Pune', 10002, NULL),
      (103, 'Hyderabad', 10003, NULL);
    
    

    5. Update Table

  • UPDATE statement in SQL is used to modify existing data in a table.
  • UPDATE statement allows you to change the values in one or more columns of one or more rows in a table.
  • Note that the UPDATE statement can also be used with subqueries to update data in a table based on the results of a query, and it can be used to update multiple columns at once by specifying multiple column-value pairs in the SET clause.
  • SYNTAX:
  • 
    UPDATE table_name
    SET column1 = value1, column2 = value2, ...
    WHERE condition;
                
    
  • In the above syntax, "table_name" is the name of the table to be updated, and "column1, column2, ..." are the names of the columns to be updated.
  • The SET keyword is used to specify the new values for the columns, and "value1, value2, ..." are the new values for the columns.
  • The WHERE clause is optional and is used to specify which rows to update. If the WHERE clause is not used, all rows in the table will be updated.

  • EXAMPLE: In the below example we will update rows based on condition.

    
    -- Update the "employee" table & assign "branch_id"
    
    UPDATE employee
    SET branch_id = 102
    WHERE emp_id = 10002 OR lead_id = 10002;
     
    

    In the above UPDATE statement example, query will update the branch_id (branch ID) column of all rows in the "employee" table where the "emp_id" is 10002 OR "lead_id" is 10002

    Querying data

  • Database tables are objects that store all the data in a database.
  • In a table, data is logically organized in a row-and-column format which is similar to a spreadsheet.
  • Each row represents a unique record in a table, and each column represents a field in the record.
  • SELECT statement

  • SELECT statement in SQL is used to retrieve data from one or more tables in a database. It allows you to specify which columns to retrieve, which table or tables to retrieve them from, and any conditions that must be met to retrieve the data.
  • The data returned is stored in a result table, called the result-set.
  • SELECT statement can also be used with various functions, such as SUM, AVG, MAX, and MIN, to perform calculations on the data, and it can be used with subqueries to retrieve data based on the results of a query.

  • SYNTAX:

    In the below syntax, "column1, column2, column3 ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from. The FROM keyword is used to specify the table or tables to retrieve the data from.

    
    SELECT column1, column2, column3 ...
    FROM table_name;
    
    

    EXAMPLE [1]:

    Below example will retrieve all the rows & column data from the table "branch".

    
    -- Select all rows from the table "branch"
    
    SELECT * FROM branch;
    
    
    OUTPUT
    branch_id branch_name hob_id head_count
    101 HeadOffice 10000 NULL
    102 Pune 10002 NULL
    103 Hyderabad 10003 NULL

    EXAMPLE [2]:

    Below example will retrieve some columns' data from the table "branch".

    
    -- Select branch_id and branch_name columns from table "branch"
    
    SELECT branch_id, branch_name
    FROM branch;
    
    
    OUTPUT
    branch_id branch_name
    101 HeadOffice
    102 Pune
    103 Hyderabad

    EXAMPLE [3]:

    SELECT DISTINCT statement is used to return only distinct values. In the below example, the SQL statement selects only the DISTINCT values from the "supply_type" column in the "vendor" table:

    
    -- select DISTINCT "supply_type" column values from "vendor" table
    
    SELECT DISTINCT supply_type 
    FROM vendor;
    
    
    OUTPUT
    supply_type
    Paper
    Pencils
    Pens
    Writing Pads

    EXAMPLE [4]:

    COUNT(DISTINCT supply_type) lists the number of different (distinct) "supply_type" in the "vendor" table:

    
    -- list number of different "supply_type" values from "vendor" table
    
    SELECT COUNT(DISTINCT supply_type) 
    FROM vendor;
    
    
    OUTPUT
     
      4 
    
    

    Sorting Data

  • Sorting data is a common task in SQL, and it can be accomplished using the ORDER BY clause in a SELECT statement.
  • When you use the SELECT statement to query data from a table, the order of rows in the result set is not guaranteed. It means that DBMS can return a result set with an unspecified order of rows.
  • ORDER BY Clause

  • ORDER BY clause is used to sort the result-set in ascending or descending order.
  • By Default ORDER BY clause sorts the rows in ascending order ( ASC ).
  • In order to sort the rows in descending order, use the DESC.
  • SYNTAX:

  • In the below syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from. The "ORDER BY" clause is used to sort the results by one or more columns.
  • The columns are listed in the order in which they should be sorted, separated by commas.
  • The optional "ASC" (ascending) or "DESC" (descending) keyword can be used to specify the sort order.
  • 
    SELECT column1, column2, ...
    FROM table_name
    ORDER BY column1 [ASC|DESC], column2 [ASC|DESC], ...;
              
    

    Sorting by one column in ascending order

    In the below example, because we did not specify ASC or DESC, the ORDER BY clause used ASC by default.

    
    -- Sorting by one column
    
    SELECT * FROM vendor
    ORDER BY vendor_name;
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Archies Writing Pads
    102 Hindustan Pencils Pencils
    103 Hindustan Pencils Pencils
    103 Kokuyo Camlin Paper
    102 Kokuyo Camlin Paper
    103 Navneet Pens

    Sorting by multiple columns and different orders

    In the below example, sorts the vendor table by the column vendor_name in ascending order ( ASC ) and then sorts the sorted result set by the column branch_id in descending order ( DESC ).

    
    -- Sorting by multiple columns
    
    SELECT * FROM vendor
    ORDER BY vendor_name ASC, branch_id DESC;
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Archies Writing Pads
    103 Hindustan Pencils Pencils
    102 Hindustan Pencils Pencils
    103 Kokuyo Camlin Paper
    102 Kokuyo Camlin Paper
    103 Navneet Pens

    SQL Operators

    SQL operators are special symbols or keywords used in SQL statements to perform arithmetic operations, comparison operations, logical operations, and string operations.
    SQL operators are used in SQL statements such as SELECT, INSERT, UPDATE, and DELETE. By using operators, you can create complex queries and manipulate data in a variety of ways.

    There are several types of operators in SQL, including:

  • Arithmetic operators: These operators perform mathematical operations on numeric values. The arithmetic operators include addition (+), subtraction (-), multiplication (*), division (/), and modulo (%).
  • Comparison operators: These operators are used to compare values in SQL. The comparison operators include equal to (=), not equal to (<> or !=), less than (<), greater than (>), less than or equal to (<=), and greater than or equal to (>=).
  • Logical operators: These operators are used to combine two or more conditions in SQL. The logical operators include AND, OR, and NOT. The AND operator returns true if both conditions are true, the OR operator returns true if either condition is true, and the NOT operator negates the condition.
  • String operators: These operators are used to manipulate string values in SQL. The string operators include concatenation || and LIKE. The concatenation operator is used to combine two or more strings into a single string, while the LIKE operator is used for pattern matching.
  • Set operators: These operators are used to combine the results of two or more SELECT statements. The set operators include UNION, UNION ALL, INTERSECT, and EXCEPT.
  • AND Operator

  • AND is a logical operator that allows you to combine two Boolean expressions.
  • It returns TRUE only when both expressions evaluate to TRUE.
  • SYNTAX:

  • In the below syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on one or more conditions.
  • The conditions are listed in the order in which they should be evaluated, separated by the AND operator.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE condition1 AND condition2 AND ...;
               
    

    EXAMPLE:

    In the below example, the SELECT statement with WHERE clause retrieves all rows with the column branch_id value is 102 AND the column supply_type value is Pencils from the vendor table.

    
    -- AND Operator example
    
    SELECT * FROM vendor
    WHERE branch_id = 102 AND supply_type = 'Pencils';
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Hindustan Pencils Pencils

    OR Operator

  • OR is a logical operator that allows you to combine two or more conditions in a WHERE clause.
  • It returns TRUE, if any of the conditions are TRUE.
  • SYNTAX:

  • In the below syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on one or more conditions.
  • The conditions are listed in the order in which they should be evaluated, separated by the OR operator.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE condition1 OR condition2 OR ...;
               
    

    EXAMPLE:

    In the below example, the SELECT statement with WHERE clause retrieves all rows with the column branch_id value is 102 OR the column supply_type value is Pencils from the vendor table.

    
    -- OR Operator example
    
    SELECT * FROM vendor
    WHERE branch_id = 102 OR supply_type = 'Pencils';
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Archies Writing Pads
    102 Hindustan Pencils Pencils
    102 Kokuyo Camlin Paper
    103 Hindustan Pencils Pencils

    NOT Operator

  • NOT is a logical operator that allows you to negate a condition in a WHERE clause.
  • NOT operator is used to negate a single condition and returns TRUE if the condition is FALSE.
  • SYNTAX:

  • In the below syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition is preceded by the NOT operator, which negates it.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE NOT condition;
               
    

    EXAMPLE:

    In the below example, the query will retrieve all rows the "vendor" table and filter the results based on a single condition: "NOT branch_id = 103". The NOT operator negates the condition "branch_id = 103", so only rows with a branch ID of other than 103 be returned.

    
    -- NOT Operator example
    
    SELECT * FROM vendor
    WHERE NOT branch_id = 103;
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Archies Writing Pads
    102 Hindustan Pencils Pencils
    102 Kokuyo Camlin Paper

    IN Operato

  • IN is a logical operator that allows you to specify multiple values in a WHERE clause.
  • IN operator is used to match a value against a list of values and returns TRUE, if the value matches any of the values in the list.

  • SYNTAX:

  • In the above syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition uses the IN operator, followed by a list of values in parentheses ( ).
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE column_name IN (value1, value2, ...);
               
    

    EXAMPLE:

    In the below example, the query will retrieve all rows, from the "vendor" table and filter the results based on a single condition: "supply_type IN ('Pencils','Pens')".
    The IN operator matches the supply type column against the list of values 'Pencils', 'Pens', so only rows with supply type matching those values will be returned.

    
    -- IN Operator example
    
    SELECT * FROM vendor
    WHERE supply_type IN ('Pencils','Pens');
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Hindustan Pencils Pencils
    103 Hindustan Pencils Pencils
    103 Navneet Pens

    BETWEEN Operator

  • BETWEEN is used to filter results based on a range of values.
  • It allows you to specify a range of values that a column value must fall between to be included in the result set.

  • SYNTAX:

  • In the above syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition uses the BETWEEN operator followed by two values, value1 and value2, separated by the AND keyword.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE column_name BETWEEN value1 AND value2;
      
    

    EXAMPLE:

    In the below example, the query will retrieve the firstname, lastname and salary columns from the "employee" table and filter the results based on a single condition: "salary BETWEEN 4500000 AND 11000000".
    The BETWEEN operator matches the salary column against the range of salary between 4500000, and 11000000, inclusive, so only rows with salary falling within that range will be returned.

    
    -- BETWEEN Operator example
    
    SELECT firstname, lastname, salary 
    FROM employee
    WHERE salary BETWEEN 4500000 AND 11000000;
    
    
    OUTPUT
    firstname lastname salary
    Rohit Patil 11000000
    Fatima Abdul 5500000
    Sandeep Shetty 4500000

    LIKE Operator

  • LIKE is used to match a string pattern in a column value.
  • It is often used in conjunction with the "%" wildcard character, which can match any number of characters in a string.

  • SYNTAX:

  • In the above syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition uses the LIKE operator followed by a string pattern to match against the values in the specified column.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE column_name LIKE pattern;
      
    

    EXAMPLE:

    In the below example, the query will retrieve all rows, from the "vendor" table and filter the results based on a single condition: supply_type LIKE 'Pen%'.
    The "%" wildcard character matches any number of characters after the "Pen" string, so only rows with supply type starting in "Pen" will be returned.

    
    -- LIKE Operator example
    
    SELECT * FROM vendor
    WHERE supply_type LIKE 'Pen%';
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Hindustan Pencils Pencils
    103 Hindustan Pencils Pencils
    103 Navneet Pens

    IS NULL Operator

  • IS NULL operator is used to check, if a column value is NULL or not.
  • It returns TRUE if the value is NULL, and FALSE, if it is not NULL.

  • SYNTAX:

  • In the above syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition uses the IS NULL operator to check, if the specified column value is NULL.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE column_name IS NULL;
      
    

    EXAMPLE:

    In the below example, the query will retrieve the firstname, lastname and lead_id columns from the "employee" table and filter the results based on a single condition: "lead_id IS NULL".
    The query will return only the rows where the "lead_id" column is null, indicating that the employee is the CEO and has no reporting manager.

    
    -- IS NULL Operator example
    
    SELECT firstname, lastname, lead_id 
    FROM employee
    WHERE lead_id IS NULL;
    
    
    OUTPUT
    firstname lastname lead_id
    Rohit Patil NULL

    IS NOT NULL Operator

  • IS NOT NULL operator is used to check, if a column value is not null.
  • It returns TRUE, if the value is not null, and FALSE if it is null.

  • SYNTAX:

  • In the above syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • WHERE clause is used to filter the results based on a single condition.
  • The condition uses the IS NOT NULL operator to check, if the specified column value is not null.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE column_name IS NOT NULL;
      
    

    EXAMPLE:

    In the below example, the query will retrieve the firstname, lastname and lead_id columns from the "employee" table and filter the results based on a single condition: "lead_id IS NOT NULL".
    The query will return only the rows where the "lead_id" column is not null, indicating that the employees have a lead reporting manager.

    
    -- IS NULL Operator example
    
    SELECT firstname, lastname, lead_id 
    FROM employee
    WHERE lead_id IS NULL;
    
    
    OUTPUT
    firstname lastname lead_id
    Fatima Abdul 10000
    Sandeep Shetty 10001
    Mahesh Dodamani 10001
    Pooja Reddy 10002
    John Smith 10002
    Sambit Ramana 10002
    Mohammad Irfan 10003
    Varun Naidu 10003
    Ritu Gupta 10003

    Filtering Data

    Filtering data is a common task in SQL, and it can be accomplished using the WHERE clause in a SELECT statement.

    WHERE Clause

  • WHERE clause allows you to specify conditions that filter the rows that are returned by a query.
  • It is used to extract only those records that fulfill a specified condition.
  • WHERE clause is not only used in SELECT statements, it is also used in UPDATE, DELETE, etc.
  • SYNTAX:

  • In the below syntax, "column1, column2, ..." are the names of the columns to retrieve, and "table_name" is the name of the table to retrieve them from.
  • The "WHERE" clause is used to filter the results based on one or more conditions.
  • The conditions are listed in the order in which they should be evaluated, separated by the "AND" or "OR" operator.
  • You can use comparison operators, such as "=", "<", ">", "<=", ">=", and "<>", to specify the conditions in the "WHERE" clause.
  • You can also use the LIKE operator to perform pattern matching on string values.
  • You can also use the IN operator to match a value against a list of possible values.
  • 
    SELECT column1, column2, ...
    FROM table_name
    WHERE condition1 [AND|OR] condition2 [AND|OR] ...;
               
    

    WHERE Clause : Filtering rows by using a equality ( = )

    In the below example, the SELECT statement with WHERE clause retrieves all rows with the column branch_id value is 102 from the vendor table.

    
    -- Filtering rows using WHERE & equality (=)
    
    SELECT * FROM vendor
    WHERE branch_id = 102;
               
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Archies Writing Pads
    102 Hindustan Pencils Pencils
    102 Kokuyo Camlin Paper

    WHERE Clause : Filtering rows that meet two conditions

    In the below example, the SELECT statement with WHERE clause retrieves all rows with the column branch_id value is 102 AND the column supply_type value is Pencils from the vendor table.

    
    -- Filtering rows with two conditions
    
    SELECT * FROM vendor
    WHERE branch_id = 102 AND supply_type = 'Pencils';
    
    
    OUTPUT
    branch_id vendor_name supply_type
    102 Hindustan Pencils Pencils

    Reserved keywords in SQL

    Below list includes SQL reserved words, as the SQL:2016 specifies and some RDBMSs have added :

    Reserved keywords in SQL & related products
    SQL:2016 IBM Db2 Mimer SQ MySQL Oracle Database PostgreSQL Microsoft SQL Server Teradata
    ABORT Teradata
    ABORTSESSION Teradata
    ABS SQL-2016 Teradata
    ABSENT SQL-2016
    ABSOLUTE Teradata
    ACCESS Oracle
    ACCESSIBLE MySQL
    ACCESS_LOCK Teradata
    ACCOUNT Teradata
    ACOS SQL-2016 Teradata
    ACOSH Teradata
    ACTION Teradata
    ADD DB2 MySQL Oracle SQL Server Teradata
    ADD_MONTHS Teradata
    ADMIN Teradata
    AFTER DB2 Teradata
    AGGREGATE Teradata
    ALIAS Teradata
    ALL SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ALLOCATE SQL-2016 DB2 Mimer Teradata
    ALLOW DB2
    ALTER SQL-2016 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ALTERAND DB2
    AMP Teradata
    ANALYSE PostgreSQL
    ANALYZE MySQL PostgreSQL
    AND SQL-2016 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ANSIDATE Teradata
    ANY SQL-2016 DB2 Mimer Oracle PostgreSQL SQL Server Teradata
    ARE SQL-2016 Teradata
    ARRAY SQL-2016 DB2 PostgreSQL Teradata
    ARRAY_AGG SQL-2016
    ARRAY_EXISTS DB2
    ARRAY_MAX_CARDINALITY SQL-2016
    AS SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ASC MySQL Oracle PostgreSQL SQL Server Teradata
    ASENSITIVE SQL-2016 DB2 MySQL
    ASIN SQL-2016 Teradata
    ASINH Teradata
    ASSERTION Teradata
    ASSOCIATE DB2
    ASUTIME DB2
    ASYMMETRIC SQL-2016 Mimer PostgreSQL
    AT SQL-2016 DB2 Mimer Teradata
    ATAN SQL-2016 Teradata
    ATAN2 Teradata
    ATANH Teradata
    ATOMIC SQL-2016 Mimer Teradata
    AUDIT DB2 Oracle
    AUTHORIZATION SQL-2016 Mimer PostgreSQL SQL Server Teradata
    AUX DB2
    AUXILIARY DB2
    AVE Teradata
    AVERAGE Teradata
    AVG SQL-2016 Teradata
    BACKUP SQL Server
    BEFORE DB2 MySQL Teradata
    BEGIN SQL-2016 DB2 Mimer SQL Server Teradata
    BEGIN_FRAME SQL-2016
    BEGIN_PARTITION SQL-2016
    BETWEEN SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    BIGINT SQL-2016 MySQL
    BINARY SQL-2016 MySQL PostgreSQL Teradata
    BIT Teradata
    BLOB SQL-2016 MySQL Teradata
    BOOLEAN SQL-2016 Teradata
    BOTH SQL-2016 Mimer MySQL PostgreSQL Teradata
    BREADTH Teradata
    BREAK SQL Server
    BROWSE SQL Server
    BT Teradata
    BUFFERPOOL DB2
    BULK SQL Server
    BUT Teradata
    BY SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    BYTE Teradata
    BYTEINT Teradata
    BYTES Teradata
    CALL SQL-2016 DB2 Mimer MySQL Teradata
    CALLED SQL-2016 Mimer
    CAPTURE DB2
    CARDINALITY SQL-2016
    CASCADE MySQL SQL Server Teradata
    CASCADED SQL-2016 DB2 Teradata
    CASE SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    CASESPECIFIC Teradata
    CASE_N Teradata
    CAST SQL-2016 DB2 Mimer PostgreSQL Teradata
    CATALOG Teradata
    CCSID DB2
    CD Teradata
    CEIL SQL-2016
    CEILING SQL-2016
    CHANGE MySQL
    CHAR SQL-2016 DB2 MySQL Oracle Teradata
    CHAR2HEXINT Teradata
    CHARACTER SQL-2016 DB2 MySQL Teradata
    CHARACTERS Teradata
    CHARACTER_LENGTH SQL-2016 Teradata
    CHARS Teradata
    CHAR_LENGTH SQL-2016 Teradata
    CHECK SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    CHECKPOINT SQL Server Teradata
    CLASS Teradata
    CLASSIFIER SQL-2016
    CLOB SQL-2016 Teradata
    CLONE DB2
    CLOSE SQL-2016 DB2 Mimer SQL Server Teradata
    CLUSTER DB2 Oracle Teradata
    CLUSTERED SQL Server
    CM Teradata
    COALESCE SQL-2016 SQL Server Teradata
    COLLATE SQL-2016 Mimer MySQL PostgreSQL SQL Server Teradata
    COLLATION PostgreSQL Teradata
    COLLECT SQL-2016 Teradata
    COLLECTION DB2
    COLLID DB2
    COLUMN SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    COLUMN_VALUE Oracle
    COMMENT DB2 Oracle Teradata
    COMMIT SQL-2016 DB2 Mimer SQL Server Teradata
    COMPLETION Teradata
    COMPRESS Oracle Teradata
    COMPUTE SQL Server
    CONCAT DB2
    CONCURRENTLY PostgreSQL
    CONDITION SQL-2016 DB2 Mimer MySQL
    CONNECT SQL-2016 DB2 Mimer Oracle Teradata
    CONNECTION DB2 Teradata
    CONSTRAINT SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    CONSTRAINTS Teradata
    CONSTRUCTOR Teradata
    CONTAINS SQL-2016 DB2 SQL Server
    CONTAINSTABLE SQL Server
    CONTENT DB2
    CONTINUE DB2 MySQL SQL Server Teradata
    CONVERT SQL-2016 MySQL SQL Server
    CONVERT_TABLE_HEADER Teradata
    COPY SQL-2016
    CORR SQL-2016 Teradata
    CORRESPONDING SQL-2016 Mimer Teradata
    COS SQL-2016 Teradata
    COSH SQL-2016 Teradata
    COUNT SQL-2016 Teradata
    COVAR_POP SQL-2016 Teradata
    COVAR_SAMP SQL-2016 Teradata
    CREATE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    CROSS SQL-2016 Mimer MySQL PostgreSQL SQL Server Teradata
    CS Teradata
    CSUM Teradata
    CT Teradata
    CUBE SQL-2016 DB2 MySQL Teradata
    CUME_DIST SQL-2016 MySQL
    CURRENT SQL-2016 DB2 Mimer Oracle SQL Server Teradata
    CURRENT_CATALOG SQL-2016 PostgreSQL
    CURRENT_DATE SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    CURRENT_LC_CTYPE DB2
    CURRENT_PATH SQL-2016 DB2 Mimer Teradata
    CURRENT_ROLE SQL-2016 PostgreSQL Teradata
    CURRENT_ROW SQL-2016
    CURRENT_SCHEMA SQL-2016 DB2 PostgreSQL
    CURRENT_SERVER DB2
    CURRENT_TIME SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    CURRENT_TIMESTAMP SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    CURRENT_TIMEZONE DB2
    CURRENT_USER SQL-2016 Mimer MySQL PostgreSQL SQL Server Teradata
    CURRVAL DB2
    CURSOR SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    CV Teradata
    CYCLE SQL-2016 Teradata
    DATA DB2 Teradata
    DATABASE DB2 MySQL SQL Server Teradata
    DATABASES MySQL
    DATABLOCKSIZE Teradata
    DATE SQL-2016 Oracle Teradata
    DATEFORM Teradata
    DAY SQL-2016 DB2 Mimer Teradata
    DAYS DB2
    DAY_HOUR MySQL
    DAY_MICROSECOND MySQL
    DAY_MINUTE MySQL
    DAY_SECOND MySQL
    DBCC SQL Server
    DBINFO DB2
    DEALLOCATE SQL-2016 Mimer SQL Server Teradata
    DEC SQL-2016 MySQL Teradata
    DECFLOAT SQL-2016
    DECIMAL SQL-2016 MySQL Oracle Teradata
    DECLARE SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    DEFAULT SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    DEFERRABLE PostgreSQL Teradata
    DEFERRED Teradata
    DEFINE SQL-2016
    DEGREES Teradata
    DEL Teradata
    DELAYED MySQL
    DELETE SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    DENSE_RANK SQL-2016 MySQL
    DENY SQL Server
    DEPTH Teradata
    DEREF SQL-2016 Teradata
    DESC MySQL Oracle PostgreSQL SQL Server Teradata
    DESCRIBE SQL-2016 Mimer MySQL Teradata
    DESCRIPTOR DB2 Teradata
    DESTROY Teradata
    DESTRUCTOR Teradata
    DETERMINISTIC SQL-2016 DB2 Mimer MySQL Teradata
    DIAGNOSTIC Teradata
    DIAGNOSTICS Teradata
    DICTIONARY Teradata
    DISABLE DB2
    DISABLED Teradata
    DISALLOW DB2
    DISCONNECT SQL-2016 Mimer Teradata
    DISK SQL Server
    DISTINCT SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    DISTINCTROW MySQL
    DISTRIBUTED SQL Server
    DIV MySQL
    DO SQL/PSM-2016 DB2 Mimer PostgreSQL Teradata
    DOCUMENT DB2
    DOMAIN Teradata
    DOUBLE SQL-2016 DB2 MySQL SQL Server Teradata
    DROP SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    DSSIZE DB2
    DUAL MySQL Teradata
    DUMP SQL Server Teradata
    DYNAMIC SQL-2016 DB2 Teradata
    EACH SQL-2016 MySQL Teradata
    ECHO Teradata
    EDITPROC DB2
    ELEMENT SQL-2016
    ELSE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ELSEIF SQL/PSM-2016 DB2 Mimer MySQL Teradata
    EMPTY SQL-2016 MySQL
    ENABLED Teradata
    ENCLOSED MySQL
    ENCODING DB2
    ENCRYPTION DB2
    END SQL-2016 DB2 Mimer PostgreSQL SQL Server Teradata
    END-EXEC SQL-2016 DB2 Teradata
    ENDING DB2
    END_FRAME SQL-2016
    END_PARTITION SQL-2016
    EQ Teradata
    EQUALS SQL-2016 Teradata
    ERASE DB2
    ERRLVL SQL Server
    ERROR Teradata
    ERRORFILES Teradata
    ERRORTABLES Teradata
    ESCAPE SQL-2016 DB2 Mimer SQL Server Teradata
    ESCAPED MySQL
    ET Teradata
    EVERY SQL-2016 Teradata
    EXCEPT SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    EXCEPTION DB2 Teradata
    EXCLUSIVE Oracle
    EXEC SQL-2016 SQL Server Teradata
    EXECUTE SQL-2016 DB2 Mimer SQL Server Teradata
    EXISTS SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    EXIT DB2 MySQL SQL Server Teradata
    EXP SQL-2016 Teradata
    EXPLAIN DB2 MySQL Teradata
    EXTERNAL SQL-2016 DB2 Mimer SQL Server Teradata
    EXTRACT SQL-2016 Teradata
    FALLBACK Teradata
    FALSE SQL-2016 Mimer MySQL PostgreSQL Teradata
    FASTEXPORT Teradata
    FENCED DB2
    FETCH SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    FIELDPROC DB2
    FILE Oracle SQL Server
    FILLFACTOR SQL Server
    FILTER SQL-2016
    FINAL DB2
    FIRST DB2 Mimer Teradata
    FIRST_VALUE SQL-2016 MySQL
    FLOAT SQL-2016 MySQL Oracle Teradata
    FLOAT4 MySQL
    FLOAT8 MySQL
    FLOOR SQL-2016
    FOR SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    FORCE MySQL
    FOREIGN SQL-2016 Mimer MySQL PostgreSQL SQL Server Teradata
    FORMAT Teradata
    FOUND Teradata
    FRAME_ROW SQL-2016
    FREE SQL-2016 DB2 Teradata
    FREESPACE Teradata
    FREETEXT SQL Server
    FREETEXTTABLE SQL Server
    FREEZE PostgreSQL
    FROM SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    FULL SQL-2016 DB2 Mimer PostgreSQL SQL Server Teradata
    FULLTEXT MySQL
    FUNCTION SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    FUSION SQL-2016
    GE Teradata
    GENERAL Teradata
    GENERATED DB2 MySQL Teradata
    GET SQL-2016 DB2 Mimer MySQL Teradata
    GIVE Teradata
    GLOBAL SQL-2016 DB2 Mimer Teradata
    GO DB2 Teradata
    GOTO DB2 SQL Server Teradata
    GRANT SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    GRAPHIC Teradata
    GROUP SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    GROUPING SQL-2016 MySQL Teradata
    GROUPS SQL-2016 MySQL
    GT Teradata
    HANDLER SQL/PSM-2016 DB2 Mimer Teradata
    HASH Teradata
    HASHAMP Teradata
    HASHBAKAMP Teradata
    HASHBUCKET Teradata
    HASHROW Teradata
    HAVING SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    HELP Teradata
    HIGH_PRIORITY MySQL
    HOLD SQL-2016 DB2 Mimer
    HOLDLOCK SQL Server
    HOST Teradata
    HOUR SQL-2016 DB2 Mimer Teradata
    HOURS DB2
    HOUR_MICROSECOND MySQL
    HOUR_MINUTE MySQL
    HOUR_SECOND MySQL
    IDENTIFIED Oracle
    IDENTITY SQL-2016 Mimer SQL Server Teradata
    IDENTITYCOL SQL Server
    IDENTITY_INSERT SQL Server
    IF SQL/PSM-2016 DB2 Mimer MySQL SQL Server Teradata
    IGNORE MySQL Teradata
    ILIKE PostgreSQL
    IMMEDIATE DB2 Oracle Teradata
    IN SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    INCLUSIVE DB2
    INCONSISTENT Teradata
    INCREMENT Oracle
    INDEX DB2 MySQL Oracle SQL Server Teradata
    INDICATOR SQL-2016 Mimer Teradata
    INFILE MySQL
    INHERIT DB2
    INITIAL SQL-2016 Oracle
    INITIALIZE Teradata
    INITIALLY PostgreSQL Teradata
    INITIATE Teradata
    INNER SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    INOUT SQL-2016 DB2 Mimer MySQL Teradata
    INPUT Teradata
    INS Teradata
    INSENSITIVE SQL-2016 DB2 MySQL
    INSERT SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    INSTEAD Teradata
    INT SQL-2016 MySQL Teradata
    INT1 MySQL
    INT2 MySQL
    INT3 MySQL
    INT4 MySQL
    INT8 MySQL
    INTEGER SQL-2016 MySQL Oracle Teradata
    INTEGERDATE Teradata
    INTERSECT SQL-2016 DB2 Mimer Oracle PostgreSQL SQL Server Teradata
    INTERSECTION SQL-2016
    INTERVAL SQL-2016 Mimer MySQL Teradata
    INTO SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    IO_AFTER_GTIDS MySQL
    IO_BEFORE_GTIDS MySQL
    IS SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ISNULL PostgreSQL
    ISOBID DB2
    ISOLATION Teradata
    ITERATE SQL/PSM-2016 DB2 Mimer MySQL Teradata
    JAR DB2
    JOIN SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    JOURNAL Teradata
    JSON SQL-2016
    JSON_ARRAY SQL-2016
    JSON_ARRAYAGG SQL-2016
    JSON_EXISTS SQL-2016
    JSON_OBJECT SQL-2016
    JSON_OBJECTAGG SQL-2016
    JSON_QUERY SQL-2016
    JSON_TABLE SQL-2016 MySQL
    JSON_TABLE_PRIMITIVE SQL-2016
    JSON_VALUE SQL-2016
    KEEP DB2
    KEY DB2 MySQL SQL Server Teradata
    KEYS MySQL
    KILL MySQL SQL Server
    KURTOSIS Teradata
    LABEL DB2
    LAG SQL-2016 MySQL
    LANGUAGE SQL-2016 DB2 Mimer Teradata
    LARGE SQL-2016 Mimer Teradata
    LAST DB2 Teradata
    LAST_VALUE SQL-2016 MySQL
    LATERAL SQL-2016 MySQL PostgreSQL Teradata
    LC_CTYPE DB2
    LE Teradata
    LEAD SQL-2016 MySQL
    LEADING SQL-2016 Mimer MySQL PostgreSQL Teradata
    LEAVE SQL/PSM-2016 DB2 Mimer MySQL Teradata
    LEFT SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    LESS Teradata
    LEVEL Oracle Teradata
    LIKE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    LIKE_REGEX SQL-2016
    LIMIT DB2 MySQL PostgreSQL Teradata
    LINEAR MySQL
    LINENO SQL Server
    LINES MySQL
    LISTAGG SQL-2016
    LN SQL-2016 Teradata
    LOAD MySQL SQL Server
    LOADING Teradata
    LOCAL SQL-2016 DB2 Mimer Teradata
    LOCALE DB2
    LOCALTIME SQL-2016 Mimer MySQL PostgreSQL Teradata
    LOCALTIMESTAMP SQL-2016 Mimer MySQL PostgreSQL Teradata
    LOCATOR DB2 Teradata
    LOCATORS DB2
    LOCK DB2 MySQL Oracle Teradata
    LOCKING Teradata
    LOCKMAX DB2
    LOCKSIZE DB2
    LOG SQL-2016 Teradata
    LOG10 SQL-2016
    LOGGING Teradata
    LOGON Teradata
    LONG DB2 MySQL Oracle Teradata
    LONGBLOB MySQL
    LONGTEXT MySQL
    LOOP SQL/PSM-2016 DB2 Mimer MySQL Teradata
    LOWER SQL-2016 Teradata
    LOW_PRIORITY MySQL
    LT Teradata
    MACRO Teradata
    MAINTAINED DB2
    MAP Teradata
    MASTER_BIND MySQL
    MATCH SQL-2016 Mimer MySQL Teradata
    MATCHES SQL-2016
    MATCH_NUMBER SQL-2016
    MATCH_RECOGNIZE SQL-2016
    MATERIALIZED DB2
    MAVG Teradata
    MAX SQL-2016 Teradata
    MAXEXTENTS Oracle
    MAXIMUM Teradata
    MAXVALUE MySQL
    MCHARACTERS Teradata
    MDIFF Teradata
    MEDIUMBLOB MySQL
    MEDIUMINT MySQL
    MEDIUMTEXT MySQL
    MEMBER SQL-2016 Mimer
    MERGE SQL-2016 SQL Server Teradata
    METHOD SQL-2016 Mimer
    MICROSECOND DB2
    MICROSECONDS DB2
    MIDDLEINT MySQL
    MIN SQL-2016 Teradata
    MINDEX Teradata
    MINIMUM Teradata
    MINUS Oracle Teradata
    MINUTE SQL-2016 DB2 Mimer Teradata
    MINUTES DB2
    MINUTE_MICROSECOND MySQL
    MINUTE_SECOND MySQL
    MLINREG Teradata
    MLOAD Teradata
    MLSLABEL Oracle
    MOD SQL-2016 MySQL Teradata
    MODE Oracle Teradata
    MODIFIES SQL-2016 DB2 Mimer MySQL Teradata
    MODIFY Oracle Teradata
    MODULE SQL-2016 Mimer Teradata
    MONITOR Teradata
    MONRESOURCE Teradata
    MONSESSION Teradata
    MONTH SQL-2016 DB2 Mimer Teradata
    MONTHS DB2
    MSUBSTR Teradata
    MSUM Teradata
    MULTISET SQL-2016 Teradata
    NAMED Teradata
    NAMES Teradata
    NATIONAL SQL-2016 Mimer SQL Server Teradata
    NATURAL SQL-2016 Mimer MySQL PostgreSQL Teradata
    NCHAR SQL-2016 Teradata
    NCLOB SQL-2016 Teradata
    NE Teradata
    NESTED_TABLE_ID Oracle
    NEW SQL-2016 Mimer Teradata
    NEW_TABLE Teradata
    NEXT DB2 Mimer Teradata
    NEXTVAL DB2
    NO SQL-2016 DB2 Mimer Teradata
    NOAUDIT Oracle
    NOCHECK SQL Server
    NOCOMPRESS Oracle
    NONCLUSTERED SQL Server
    NONE SQL-2016 DB2 Teradata
    NORMALIZE SQL-2016
    NOT SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    NOTNULL PostgreSQL
    NOWAIT Oracle Teradata
    NO_WRITE_TO_BINLOG MySQL
    NTH_VALUE SQL-2016 MySQL
    NTILE SQL-2016 MySQL
    NULL SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    NULLIF SQL-2016 SQL Server Teradata
    NULLIFZERO Teradata
    NULLS DB2
    NUMBER Oracle
    NUMERIC SQL-2016 MySQL Teradata
    NUMPARTS DB2
    OBID DB2
    OBJECT Teradata
    OBJECTS Teradata
    OCCURRENCES_REGEX SQL-2016
    OCTET_LENGTH SQL-2016 Teradata
    OF SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    OFF SQL Server Teradata
    OFFLINE Oracle
    OFFSET SQL-2016 DB2 Mimer PostgreSQL
    OFFSETS SQL Server
    OLD SQL-2016 DB2 Mimer Teradata
    OLD_TABLE Teradata
    OMIT SQL-2016
    ON SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ONE SQL-2016
    ONLINE Oracle
    ONLY SQL-2016 PostgreSQL Teradata
    OPEN SQL-2016 DB2 Mimer SQL Server Teradata
    OPENDATASOURCE SQL Server
    OPENQUERY SQL Server
    OPENROWSET SQL Server
    OPENXML SQL Server
    OPERATION Teradata
    OPTIMIZATION DB2
    OPTIMIZE DB2 MySQL
    OPTIMIZER_COSTS MySQL
    OPTION MySQL Oracle SQL Server Teradata
    OPTIONALLY MySQL
    OR SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ORDER SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    ORDINALITY Teradata
    ORGANIZATION DB2
    OUT SQL-2016 DB2 Mimer MySQL Teradata
    OUTER SQL-2016 DB2 MySQL PostgreSQL SQL Server Teradata
    OUTFILE MySQL
    OUTPUT Teradata
    OVER SQL-2016 MySQL SQL Server Teradata
    OVERLAPS SQL-2016 Mimer PostgreSQL Teradata
    OVERLAY SQL-2016
    OVERRIDE Teradata
    PACKAGE DB2
    PAD Teradata
    PADDED DB2
    PARAMETER SQL-2016 DB2 Mimer Teradata
    PARAMETERS Teradata
    PART DB2
    PARTIAL Teradata
    PARTITION SQL-2016 DB2 MySQL
    PARTITIONED DB2
    PARTITIONING DB2
    PASSWORD Teradata
    PATH DB2 Teradata
    PATTERN SQL-2016
    PCTFREE Oracle
    PER SQL-2016
    PERCENT SQL-2016 SQL Server Teradata
    PERCENTILE_CONT SQL-2016
    PERCENTILE_DISC SQL-2016
    PERCENT_RANK SQL-2016 MySQL Teradata
    PERIOD SQL-2016 DB2
    PERM Teradata
    PERMANENT Teradata
    PIECESIZE DB2
    PIVOT SQL Server
    PLACING PostgreSQL
    PLAN DB2 SQL Server
    PORTION SQL-2016
    POSITION SQL-2016 Teradata
    POSITION_REGEX SQL-2016
    POSTFIX Teradata
    POWER SQL-2016
    PRECEDES SQL-2016
    PRECISION SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    PREFIX Teradata
    PREORDER Teradata
    PREPARE SQL-2016 DB2 Mimer Teradata
    PRESERVE Teradata
    PREVVAL DB2
    PRIMARY SQL-2016 Mimer MySQL PostgreSQL SQL Server Teradata
    PRINT SQL Server
    PRIOR DB2 Oracle Teradata
    PRIQTY DB2
    PRIVATE Teradata
    PRIVILEGES DB2 Teradata
    PROC SQL Server
    PROCEDURE SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    PROFILE Teradata
    PROGRAM DB2
    PROPORTIONAL Teradata
    PROTECTION Teradata
    PSID DB2
    PTF SQL-2016
    PUBLIC DB2 Oracle SQL Server Teradata
    PURGE MySQL
    QUALIFIED Teradata
    QUALIFY Teradata
    QUANTILE Teradata
    QUERY DB2
    QUERYNO DB2
    RADIANS Teradata
    RAISERROR SQL Server
    RANDOM Teradata
    RANGE SQL-2016 MySQL
    RANGE_N Teradata
    RANK SQL-2016 MySQL Teradata
    RAW Oracle
    READ MySQL SQL Server Teradata
    READS SQL-2016 DB2 Mimer MySQL Teradata
    READTEXT SQL Server
    READ_WRITE MySQL
    REAL SQL-2016 MySQL Teradata
    RECONFIGURE SQL Server
    RECURSIVE SQL-2016 Mimer MySQL Teradata
    REF SQL-2016 Teradata
    REFERENCES SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    REFERENCING SQL-2016 Mimer Teradata
    REFRESH DB2
    REGEXP MySQL
    REGR_AVGX SQL-2016 Teradata
    REGR_AVGY SQL-2016 Teradata
    REGR_COUNT SQL-2016 Teradata
    REGR_INTERCEPT SQL-2016 Teradata
    REGR_R2 SQL-2016 Teradata
    REGR_SLOPE SQL-2016 Teradata
    REGR_SXX SQL-2016 Teradata
    REGR_SXY SQL-2016 Teradata
    REGR_SYY SQL-2016 Teradata
    RELATIVE Teradata
    RELEASE SQL-2016 DB2 Mimer MySQL Teradata
    RENAME DB2 MySQL Oracle Teradata
    REPEAT SQL/PSM-2016 DB2 Mimer MySQL Teradata
    REPLACE MySQL Teradata
    REPLICATION SQL Server Teradata
    REPOVERRIDE Teradata
    REQUEST Teradata
    REQUIRE MySQL
    RESIGNAL SQL/PSM-2016 DB2 Mimer MySQL
    RESOURCE Oracle
    RESTART Teradata
    RESTORE SQL Server Teradata
    RESTRICT DB2 MySQL SQL Server Teradata
    RESULT SQL-2016 DB2 Mimer Teradata
    RESULT_SET_LOCATOR DB2
    RESUME Teradata
    RET Teradata
    RETRIEVE Teradata
    RETURN SQL-2016 DB2 Mimer MySQL SQL Server Teradata
    RETURNING PostgreSQL
    RETURNS SQL-2016 DB2 Mimer Teradata
    REVALIDATE Teradata
    REVERT SQL Server
    REVOKE SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    RIGHT SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    RIGHTS Teradata
    RLIKE MySQL
    ROLE DB2 Teradata
    ROLLBACK SQL-2016 DB2 Mimer SQL Server Teradata
    ROLLFORWARD Teradata
    ROLLUP SQL-2016 DB2 Teradata
    ROUND_CEILING DB2
    ROUND_DOWN DB2
    ROUND_FLOOR DB2
    ROUND_HALF_DOWN DB2
    ROUND_HALF_EVEN DB2
    ROUND_HALF_UP DB2
    ROUND_UP DB2
    ROUTINE Teradata
    ROW SQL-2016 DB2 Mimer MySQL Oracle Teradata
    ROWCOUNT SQL Server
    ROWGUIDCOL SQL Server
    ROWID Oracle Teradata
    ROWNUM Oracle
    ROWS SQL-2016 Mimer MySQL Oracle Teradata
    ROWSET DB2
    ROW_NUMBER SQL-2016 MySQL Teradata
    RULE SQL Server
    RUN DB2
    RUNNING SQL-2016
    SAMPLE Teradata
    SAMPLEID Teradata
    SAVE SQL Server
    SAVEPOINT SQL-2016 DB2 Teradata
    SCHEMA DB2 MySQL SQL Server Teradata
    SCHEMAS MySQL
    SCOPE SQL-2016 Teradata
    SCRATCHPAD DB2
    SCROLL SQL-2016 Mimer Teradata
    SEARCH SQL-2016 Teradata
    SECOND SQL-2016 DB2 Mimer Teradata
    SECONDS DB2
    SECOND_MICROSECOND MySQL
    SECQTY DB2
    SECTION Teradata
    SECURITY DB2
    SECURITYAUDIT SQL Server
    SEEK SQL-2016
    SEL Teradata
    SELECT SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    SEMANTICKEYPHRASETABLE SQL Server
    SEMANTICSIMILARITYTABLE SQL Server
    SENSITIVE SQL-2016 DB2 MySQL
    SEPARATOR MySQL
    SEQUENCE DB2 Teradata
    SESSION Oracle Teradata
    SESSION_USER SQL-2016 DB2 Mimer PostgreSQL SQL Server Teradata
    SET SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    SETRESRATE Teradata
    SETS Teradata
    SETSESSRATE Teradata
    SETUSER SQL Server
    SHARE Oracle
    SHOW SQL-2016 MySQL Teradata
    SHUTDOWN SQL Server
    SIGNAL SQL/PSM-2016 DB2 Mimer MySQL
    SIMILAR SQL-2016 PostgreSQL
    SIMPLE DB2
    SIN SQL-2016 Teradata
    SINH SQL-2016 Teradata
    SIZE Oracle Teradata
    SKEW Teradata
    SKIP SQL-2016
    SMALLINT SQL-2016 MySQL Oracle Teradata
    SOME SQL-2016 DB2 Mimer PostgreSQL SQL Server Teradata
    SOUNDEX Teradata
    SOURCE DB2
    SPACE Teradata
    SPATIAL MySQL
    SPECIFIC SQL-2016 DB2 Mimer MySQL Teradata
    SPECIFICTYPE SQL-2016 Teradata
    SPOOL Teradata
    SQL SQL-2016 Mimer MySQL Teradata
    SQLEXCEPTION SQL-2016 Mimer MySQL Teradata
    SQLSTATE SQL-2016 Mimer MySQL Teradata
    SQLTEXT Teradata
    SQLWARNING SQL-2016 Mimer MySQL Teradata
    SQL_BIG_RESULT MySQL
    SQL_CALC_FOUND_ROWS MySQL
    SQL_SMALL_RESULT MySQL
    SQRT SQL-2016 Teradata
    SS Teradata
    SSL MySQL
    STANDARD DB2
    START SQL-2016 Mimer Oracle Teradata
    STARTING MySQL
    STARTUP Teradata
    STATE Teradata
    STATEMENT DB2 Teradata
    STATIC SQL-2016 DB2 Mimer Teradata
    STATISTICS SQL Server Teradata
    STAY DB2
    STDDEV_POP SQL-2016 Teradata
    STDDEV_SAMP SQL-2016 Teradata
    STEPINFO Teradata
    STOGROUP DB2
    STORED MySQL
    STORES DB2
    STRAIGHT_JOIN MySQL
    STRING_CS Teradata
    STRUCTURE Teradata
    STYLE DB2
    SUBMULTISET SQL-2016
    SUBSCRIBER Teradata
    SUBSET SQL-2016
    SUBSTR Teradata
    SUBSTRING SQL-2016 Teradata
    SUBSTRING_REGEX SQL-2016
    SUCCEEDS SQL-2016
    SUCCESSFUL Oracle
    SUM SQL-2016 Teradata
    SUMMARY DB2 Teradata
    SUSPEND Teradata
    SYMMETRIC SQL-2016 Mimer PostgreSQL
    SYNONYM DB2 Oracle
    SYSDATE DB2 Oracle
    SYSTEM SQL-2016 DB2 MySQL
    SYSTEM_TIME SQL-2016
    SYSTEM_USER SQL-2016 Mimer SQL Server Teradata
    SYSTIMESTAMP DB2
    TABLE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    TABLESAMPLE SQL-2016 PostgreSQL SQL Server
    TABLESPACE DB2
    TAN SQL-2016 Teradata
    TANH SQL-2016 Teradata
    TBL_CS Teradata
    TEMPORARY Teradata
    TERMINATE Teradata
    TERMINATED MySQL
    TEXTSIZE SQL Server
    THAN Teradata
    THEN SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    THRESHOLD Teradata
    TIME SQL-2016 Teradata
    TIMESTAMP SQL-2016 Teradata
    TIMEZONE_HOUR SQL-2016 Mimer Teradata
    TIMEZONE_MINUTE SQL-2016 Mimer Teradata
    TINYBLOB MySQL
    TINYINT MySQL
    TINYTEXT MySQL
    TITLE Teradata
    TO SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    TOP SQL Server
    TRACE Teradata
    TRAILING SQL-2016 Mimer MySQL PostgreSQL Teradata
    TRAN SQL Server
    TRANSACTION SQL Server Teradata
    TRANSLATE SQL-2016 Teradata
    TRANSLATE_CHK Teradata
    TRANSLATE_REGEX SQL-2016
    TRANSLATION SQL-2016 Teradata
    TREAT SQL-2016 Mimer Teradata
    TRIGGER SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    TRIM SQL-2016 Teradata
    TRIM_ARRAY SQL-2016
    TRUE SQL-2016 Mimer MySQL PostgreSQL Teradata
    TRUNCATE SQL-2016 DB2 SQL Server
    TRY_CONVERT SQL Server
    TSEQUAL SQL Server
    TYPE DB2 Teradata
    UC Teradata
    UESCAPE SQL-2016
    UID Oracle
    UNDEFINED Teradata
    UNDER Teradata
    UNDO DB2 MySQL Teradata
    UNION SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    UNIQUE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    UNKNOWN SQL-2016 Mimer Teradata
    UNLOCK MySQL
    UNNEST SQL-2016 Teradata
    UNPIVOT SQL Server
    UNSIGNED MySQL
    UNTIL SQL/PSM-2016 DB2 Mimer Teradata
    UPD Teradata
    UPDATE SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    UPDATETEXT SQL Server
    UPPER SQL-2016 Teradata
    UPPERCASE Teradata
    USAGE MySQL Teradata
    USE MySQL SQL Server
    USER SQL-2016 DB2 Mimer Oracle PostgreSQL SQL Server Teradata
    USING SQL-2016 DB2 Mimer MySQL PostgreSQL Teradata
    UTC_DATE MySQL
    UTC_TIME MySQL
    UTC_TIMESTAMP MySQL
    VALIDATE Oracle
    VALIDPROC DB2
    VALUE SQL-2016 DB2 Mimer Teradata
    VALUES SQL-2016 DB2 Mimer MySQL Oracle SQL Server Teradata
    VALUE_OF SQL-2016
    VARBINARY SQL-2016 MySQL
    VARBYTE Teradata
    VARCHAR SQL-2016 MySQL Oracle Teradata
    VARCHAR2 Oracle
    VARCHARACTER MySQL
    VARGRAPHIC Teradata
    VARIABLE DB2 Teradata
    VARIADIC PostgreSQL
    VARIANT DB2
    VARYING SQL-2016 Mimer MySQL SQL Server Teradata
    VAR_POP SQL-2016 Teradata
    VAR_SAMP SQL-2016 Teradata
    VCAT DB2
    VERBOSE PostgreSQL
    VERSIONING SQL-2016 DB2
    VIEW DB2 Oracle SQL Server Teradata
    VIRTUAL MySQL
    VOLATILE DB2 Teradata
    VOLUMES DB2
    WAIT Teradata
    WAITFOR SQL Server
    WHEN SQL-2016 DB2 Mimer MySQL PostgreSQL SQL Server Teradata
    WHENEVER SQL-2016 DB2 Oracle Teradata
    WHERE SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    WHILE SQL/PSM-2016 DB2 Mimer MySQL SQL Server Teradata
    WIDTH_BUCKET SQL-2016 Teradata
    WINDOW SQL-2016 MySQL PostgreSQL
    WITH SQL-2016 DB2 Mimer MySQL Oracle PostgreSQL SQL Server Teradata
    WITHIN SQL-2016
    WITHIN_GROUP SQL Server
    WITHOUT SQL-2016 Mimer Teradata
    WLM DB2
    WORK Teradata
    WRITE MySQL Teradata
    WRITETEXT SQL Server
    XMLCAST DB2
    XMLEXISTS DB2
    XMLNAMESPACES DB2
    XOR MySQL
    YEAR SQL-2016 DB2 Mimer Teradata
    YEARS DB2
    YEAR_MONTH MySQL
    ZEROFILL MySQL
    ZEROIFNULL Teradata
    ZONE DB2 Teradata