SQL

Cards (19)

  • What is SQL used for?
    To manage data in a relational database
  • What can you do with SQL in relation to data?
    Retrieve, update, insert, and delete data
  • What does VARCHAR(n) represent in SQL?
    Variable length string of max length n
  • What does CHAR(n) represent in SQL?
    Fixed length string of n characters
  • What data type is used for dates in SQL?
    DATE
  • What data type is used for floating point decimal numbers in SQL?
    DOUBLE
  • What does BLOB stand for in SQL?
    Binary Large Object
  • What is the purpose of the CREATE TABLE command?
    To define a database table
  • How would you insert a new student record in SQL?
    Using INSERT INTO command
  • What SQL command updates a student's first name and age?
    UPDATE student SET firstName = "India", age = 14
  • What does the SELECT command do in SQL?
    Retrieves data from a database
  • How do you terminate SQL commands?
    With a semi-colon
  • What type of language is SQL?
    Declarative language
  • What are the types of SQL languages and their purposes?
    • Data Definition Language (DDL): Define and modify database
    • Data Query Language (DQL): Retrieve data from database
    • Data Manipulation Language (DML): Insert, update, delete data
    • Data Control Language (DCL): Grant and revoke permissions
    • Data Transmission Language (DTL): Manage transactions
  • What is the purpose of Data Definition Language (DDL)?
    To define and modify a database
  • What does Data Query Language (DQL) allow you to do?
    Retrieve data from a database
  • What is the function of Data Manipulation Language (DML)?
    Insert, update, and delete data
  • What does Data Control Language (DCL) manage?
    Access permissions for database
  • What is the purpose of Data Transmission Language (DTL)?
    Manage transactions