0% found this document useful (0 votes)
50 views23 pages

Lab Manual For Introduction To Database Systems: Lab-05 Data Definition Language (DDL)

Uploaded by

pakistan 01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
50 views23 pages

Lab Manual For Introduction To Database Systems: Lab-05 Data Definition Language (DDL)

Uploaded by

pakistan 01
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 23

Lab Manual for Introduction to Database Systems

Lab-05
Data Definition Language (DDL)
Lab 05: Data Definition Language

Contents

1. Introduction 4

2. Activity Time boxing 4

3. Objective of the experiment 4

4. Concept Map 4
4.1 Relational Data Model: Error! Bookmark not defined.
4.2 Database Management System (DBMS): Error! Bookmark not defined.
4.3 Relational Database Management System (RDBMS): Error! Bookmark not defined.
4.4 SQL (Structured Query Language): Error! Bookmark not defined.
4.4.1 Data Definition Language Error! Bookmark not defined.
4.4.2 Data Manipulation Language Error! Bookmark not defined.
4.4.3 Data Control Language Error! Bookmark not defined.
4.5 MySQL: Error! Bookmark not defined.
4.6 PHP: Error! Bookmark not defined.
4.7 PHPMyAdmin: Error! Bookmark not defined.
4.8 XAMPP: Error! Bookmark not defined.

5. Homework before Lab 4


5.1 Task 1 4

6. Procedure & Tools 5


6.1 Installing and Configuring XAMPP (MySQL, Apache)Error! Bookmark not defined.
6.1.1 Download XAMPP fromError! Bookmark not defined.
6.1.2 Start the XAMPP installation. Error! Bookmark not defined.
6.1.3 Configuring the Environment Variable Error! Bookmark not defined.
6.2 Walkthrough Tasks 5
6.2.1 Creating A Database Using CREATE DATABASE Statement 6
6.2.2 View Available Databases Using SHOW DATABASES Statement 6
6.2.3 Selecting A Database Using USE Statement 6
6.2.4 Creating A Table In Selected Database Using CREATE TABLE Statement 7
6.2.5 View Available Tables Using SHOW TABLES Statement 8
6.2.6 View the Details Of A Table Using DESCRIBE Statement 9
6.2.7 ALTER TABLE 9
6.2.8 Dropping A Table: 12
6.2.9 Dropping A Database: 12

7. Practice Tasks 13
7.1 Practice Task 1 [Expected time = 65mins] 13
7.1.1 Customers 13
7.1.2 Payments 142
7.1.3 Practice queries 142

Department of Computer Science, Page 2


C.U.S.T.
Lab 05: Data Definition Language

8. Evaluation Task (Unseen) [Expected time = 30mins for tasks] 142

9. Evaluation criteria 142

10. Further Reading 222


10.1 Slides 222

11. REFERENCES: 222

Department of Computer Science, Page 3


C.U.S.T.
Lab 05: Data Definition Language

Lab 05: Data Definition Language


1. Introduction
As we have briefly discussed some DDL operation like Create database and create table in Lab
4, now in this lab we will discuss all the remaining operation of DDL.

Relevant Lecture Material

a) Text Book: Database Systems, A practical approach to design, implementation,


and management by Thomas Connolly, Carolyn Begg, Addison Wesley, Fifth
Edition,
1. Read URL:
i. https://dev.mysql.com/doc/refman/8.0/en/innodb-online-ddl-
operations.html

2. Activity Time boxing

Task Activity Name Activity time Total Time


No.
4.1 Introduction 60 mins 50 mins
6.2 Installing and Setting Up 15 mins 15 mins
XAMPP (MySQL, Apache)
6.3 Walkthrough Tasks 5 mins 60 mins
7 Practice tasks 10 mins for each task 45 mins
Table 1: Activity Time Boxing

3. Objective of the experiment


• To learn about the DDL Operation

4. Concept Map
In this section, a brief overview of the concepts is presented, those will be used in this lab
afterwards.
DDL or Data Definition Language actually consists of the SQL commands that can be used to
define the database schema. DDL allows to add / modify / delete the logical structures which
contain the data or which allow users to access / maintain the data (databases, tables, keys,
views...). DDL is about "metadata"
In a walkthrough section we have discussed all the operation related to DDL.

5. Homework before Lab


You must solve the following problems at home before the lab.

5.1 Task 1
Study Relational Data Model.

Department of Computer Science, Page 4


C.U.S.T.
Lab 05: Data Definition Language

6. Procedure & Tools


In this section, procedure of the tasks and setup of required tools is defined.
• First Start the Xamp Server which you have installed in First Lab.
• Start the Command Prompt.

6.1 Walkthrough Tasks


These tasks are designed to guide you to use the tools, implement the basic concepts of DDL.
There are three basic statements within the DDL i.e. CREATE, DROP and ALTER. We will be
focusing on CREATE, USE, ALTER, and DROP statements in this lab.

We will use MySQL RDBMS that provides Console and GUI based tools to run or test our SQL
Queries. We will use MySQL CLI and an open source web based GUI tool called
“PHPMyAdmin” to execute our SQL queries. We will start with MySQL CLI, a statement line
interface, see Figure 12. Login to MySQL CLI with “root” user and empty string as password.
Type following statement in statement line and hit Enter, it will ask for password, as password is
empty string, simply Hit Enter again. See Figure 13.

MySQL -u root -p

Figure 13: Logging in to MySQL CLI

At MySQL CLI, as shown in Figure 13, you can enter database statements followed by Enter.

Note that:
1. Most MySQL statements end with a semicolon (;)
2. MySQL returns the total number of rows found, and the total time to execute the query.
3. Keywords may be entered in any letter case i.e. uppercase or lowercase.

Now we will start using the MySQL CLI to create and manage databases. We would learn SQL
statements in the following sections. For each statement, first its generic definition is provided
and then explained with an example, to learn the generic definition of MySQL statement read
Appendix III.

Department of Computer Science, Page 5


C.U.S.T.
Lab 05: Data Definition Language

6.1.1 Creating A Database Using CREATE DATABASE Statement


You first need to create a database in which you will store your tables. This can be considered
analogous to opening a blank database. To create a database, we use the CREATE DATABASE
statement.

Figure 14: Creating “Shop_db” database

In Figure 14, A database named “shop_db” is created.

6.1.2 View Available Databases Using SHOW DATABASES Statement


To show all the databases available on MySQL server, we use the SHOW DATABASES
statement. See Figure 15.

Figure 15: Viewing all available databases

6.1.3 Selecting A Database Using USE Statement


Before starting to work (e.g. create tables, write queries etc.) with your database, you must select
the database you are going to use. To do this, we use the USE statement.

Department of Computer Science, Page 6


C.U.S.T.
Lab 05: Data Definition Language

Figure 16: Select or Change the current database.

In Figure 16, we have selected a database “shop_db” to perform further operations.

6.1.4 Creating A Table In Selected Database Using CREATE TABLE Statement


To create tables, we use the CREATE TABLE statement, the generic syntax of CREATE
TABLE statement is:

CREATE TABLE [IF NOT EXISTS] <table_name> (


<column_name> <columnDataType> <columnConstraints>, ... )

For Example,

CREATE TABLE movies (


m_id int(10),
m_title varchar(255)
m_year year
);

By running the above example, a table would be created with the name “movies” which has 3
columns: m_id, m_title, and m_year. In MySQL, we must specify a data type for each field. The
following section tells about the data types in detail.

6.1.4.1 DataTypes
We can specify with each column, the data type for that column, See Appendix I for a complete
list of MySQL data types, the most commonly used data types in MySQL are given in the Table
3.

Data Type Description


TINYINT, SMALLINT, MEDIUMINT, Integer values
INT, BIGINT
FLOAT, DOUBLE Floating-point values
DECIMAL Decimal values
CHAR Fixed length strings up to 255 characters
VARCHAR Variable length strings up to 255
characters
TINYBLOB, BLOB, MEDIUMBLOB, Longer blocks of text data
LONGBLOB
DATE, TIME, YEAR Date; time or duration; year values
DATETIME Combined data and time values
TIMESTAMP Timestamps
ENUM One of a set of predefined values
SET Zero or one
Table 3: The most commonly used data types in MySQL.
Department of Computer Science, Page 7
C.U.S.T.
Lab 05: Data Definition Language

6.1.4.2 Constraints
In addition to the data type of the columns, we can also specify field modifiers/constraints and
keys when creating a table:

• Is the column’s value allowed to be empty? We can specify this using the constraints
NULL and NOT NULL.

For Example,
CREATE TABLE movies (
m_id int(10) NOT NULL,
m_name varchar(255) NOT NULL
);

• Using the DEFAULT modifier we can specify a default value for the column.

For Example,
CREATE TABLE movies (
m_id int(10) NOT NULL,
m_name varchar(255) NOT NULL DEFAULT ‘No Name’,
);

• If we want the values for a column to be unique, we can use the UNIQUE modifier.

For Example,
CREATE TABLE movies (
m_id int(10),
m_name varchar(255) UNIQUE,
);

6.1.5 View Available Tables Using SHOW TABLES Statement


To view all the tables available in the current database, we use SHOW TABLES statement. In
Figure 17, All tables of shop_db are being viewed.

Figure 17: Viewing tables in the shop_db database.

Department of Computer Science, Page 8


C.U.S.T.
Lab 05: Data Definition Language

6.1.6 View the Details Of A Table Using DESCRIBE Statement


To view the columns, their data types and constraints applied on the columns we use DESCRIBE
statement. The generic syntax of DESCRIBE statement is:

DESCRIBE <tablename>;

For Example, to view the details of “movies” table, the following statement would be written,
see Figure 18.
DESCRIBE movies;

Figure 18: Viewing details of movies table.

6.1.7 ALTER TABLE


We use the statement ALTER TABLE statement to modify the design of the tables after we
create them. There are various types of altering operations in MySQL i.e. renaming a table,
adding a new column, dropping a column, and modifying a column’s definition. Now we will see
each operation one by one.

6.1.7.1 Renaming A Table


To rename a table, RENAME TO clause is used with ALTER TABLE statement, the generic
syntax is

ALTER TABLE <tableName> RENAME TO <newTableName>

For Example, to rename movies table to products, the following statement can be written, see
Figure 18.
ALTER TABLE movies RENAME TO products;

Department of Computer Science, Page 9


C.U.S.T.
Lab 05: Data Definition Language

Figure 18: Viewing tables after renaming.

Table movies is “renamed to “products”, in Figure 18.

6.1.7.2 Modifying A Column


The definition of a column can be modified by using the CHANGE clause with the ALTER
statement, The generic syntax to modify the column is:

ALTER TABLE <tableName> CHANGE <columnName> <newColumnName>


<newColumnDataType> <newColumnConstraints>

Figure 18: Changing the name and datatype of a column “movie_name” of table “products”.

In the Figure 18, definition of a column named movie_name is modified as


• Its name is changed to product_name
• Datatype to varchar(55)

6.1.7.3 Adding A New Column


The generic syntax for adding a new column is:

Department of Computer Science, Page 10


C.U.S.T.
Lab 05: Data Definition Language

ALTER TABLE <tableName> ADD <columnName> <columnDataType> <columnConstraints>, ...

For Example, to add a new column “product_price” of type double, the following statement can
be written:
ALTER TABLE products ADD product_price double;

Figure 19: Adding product_price column in products table.

In Figure 19, A new column product_price can be seen in the description of table products after
adding the column.

6.1.7.4 Dropping a column:


The generic syntax for dropping a column is:

ALTER TABLE <tableName> DROP <columnName>;

For Example, to drop a column “product_price”, the following statement can be written:

ALTER TABLE products DROP product_price;

Department of Computer Science, Page 11


C.U.S.T.
Lab 05: Data Definition Language

Figure 20: Dropping product_price column from products table.

In Figure 20, the column product_price is dropped, see description before and after dropping the
column.

6.1.8 Dropping A Table:


The generic syntax of DROP TABLE statement for dropping a table from a database is:

DROP TABLE <tablename>

For Example, to drop table “products” from shop_db, the following statement can be written:

DROP TABLE products

Figure 22: Dropping “products” table from shop_db.

In Figure 22, the table “products” is dropped from the database shop_db.

6.1.9 Dropping A Database:


The generic syntax of DROP DATABASE statement for dropping a database is:

Department of Computer Science, Page 12


C.U.S.T.
Lab 05: Data Definition Language

DROP DATABASE <database_name>

For Example, to drop the database shop_db, the following statement can be written:

DROP DATABASE shop_db;

(a) (b)
Figure 22: Dropping “shop_db” database.

In Figure 22(a), the database shop_db is present and after executing the DROP DATABASE
statement it gets dropped, see Figure 22 (b).

7. Practice Tasks
This section will provide more practice exercises which you need to finish during the lab. You
need to finish the tasks in the required time. When you finish them, put these tasks in the
following folder:
\\fs\assignments$\Introduction to Database Management Systems\Lab1

7.1 Practice Task 1 [Expected time = 65mins]


Your task is to create the database “practice_db” and following tables with the required
constraints.

7.1.1 Customers
Create table customers with the columns given in Table 4.

Column Name Data Type Constraints

customer_number INT NOT NULL, AUTO_INCREMENT


customer_name VARCHAR(50) NOT NULL
Phone VARCHAR(50) NOT NULL

Department of Computer Science, Page 13


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

address_line1 VARCHAR(50) NOT NULL


address_line2 VARCHAR(50) NULL
joining_date TIMESTAMP NOT NULL, DEFAULT CURRENT_TIMESTMP
credit_limit DOUBLE NOT NULL, DEFAULT 0
Table 4: Column’s details for table customers

7.1.2 Payments
Create table payments with the columns given in Table 5.

Column Name Data Type Constraints

customer_number INT NOT NULL


check_number VARCHAR(50) NOT NULL
payement_date VARCHAR(50) NOT NULL
Amount DOUBLE NOT NULL
Table 5: Column’s details for table payments

7.1.3 Practice queries


Use the database created above and practice following queries:

1. Remove column address_line2 from the table customers.


2. Change datatype of column phone to varchar(20) in the table customers.
3. Add column status with datatype varchar(50) and default value “active”.
4. Add column email with datatype varchar(100) and constraint UNIQUE.
5. Drop table payments.
6. Drop database “practice_db”.

8. Evaluation Task (Unseen) [Expected time = 30mins for tasks]

The lab instructor will give you unseen task depending upon the progress of the class.

9. Evaluation criteria
The evaluation criteria for this lab will be based on the completion of the following tasks. Each
task is assigned the marks percentage which will be evaluated by the instructor in the lab whether
the student has finished the complete/partial task(s).
Table 3: Evaluation of the Lab
Sr. No. Task Description Marks
No
1 6 Procedures and Tools 05
2 7 Practice tasks and Testing 15
3 8 Evaluation Tasks (Unseen) 80

Department of Computer Science, Page 14


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

10. Further Reading

This section provides the references to further polish your skills.

10.1 Slides

The slides and reading material can be accessed from the folder of the class instructor available
at \\fs\lectures$\

11. REFERENCES:

11.1 SQL-99 Complete, Really, by Peter Gulutzan & Trudy Pelzer.

Department of Computer Science, Page 22


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Appendix I
MySQL data types:
MySQL uses many different data types broken into three categories:
1) numeric,
2) date and time, and
3) string types.

Numeric data types:


1) INT - A normal-sized integer that can be signed or unsigned. If signed, the allowable
range is from -2147483648 to 2147483647. If unsigned, the allowable range is from 0 to
4294967295. You can specify a width of up to 11 digits.
2) TINYINT - A very small integer that can be signed or unsigned. If signed, the allowable
range is from -128 to 127. If unsigned, the allowable range is from 0 to 255. You can specify a
width of up to 4 digits.
3) SMALLINT - A small integer that can be signed or unsigned. If signed, the allowable
range is from -32768 to 32767. If unsigned, the allowable range is from 0 to 65535. You can
specify a width of up to 5 digits.
4) MEDIUMINT - A medium-sized integer that can be signed or unsigned. If signed, the
allowable range is from - 8388608 to 8388607. If unsigned, the allowable range is from 0 to
16777215. You can specify a width of up to 9 digits.
5) BIGINT - A large integer that can be signed or unsigned. If signed, the allowable range
is from - 9223372036854775808 to 9223372036854775807. If unsigned, the allowable range is
from 0 to 18446744073709551615. You can specify a width of up to 20 digits.
6) FLOAT(M,D) - A floating-point number that cannot be unsigned. You can define the
display length (M) and the number of decimals (D). This is not required and will default to
10,2, where 2 is the number of decimals and 10 is the total number of digits (including
decimals). Decimal precision can go to 24 places for a FLOAT.
7) DOUBLE(M,D) - A double precision floating-point number that cannot be unsigned.
You can define the display length (M) and the number of decimals (D). This is not required and
will default to 16,4, where 4 is the number of decimals. Decimal precision can go to 53 places
for a DOUBLE. REAL is a synonym for 8) DOUBLE.
8) DECIMAL(M,D) - An unpacked floating-point number that cannot be unsigned. In
unpacked decimals, each decimal corresponds to one byte. Defining the display length (M) and
the number of decimals (D) is required. NUMERIC is a synonym for DECIMAL.

Date and Time Types:


The MySQL date and time datatypes are:
1) DATE - A date in YYYY-MM-DD format, between 1000-01-01 and 9999-12-31. For
example, December 30th, 1973 would be stored as 1973-12-30.
2) DATETIME - A date and time combination in YYYY-MM-DD HH:MM:SS format,
between 1000-01-01 00:00:00 and 9999-12-31 23:59:59. For example, 3:30 in the afternoon
on December 30th, 1973 would be stored as 1973- 12-30 15:30:00.

Department of Computer Science, Page 23


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

3) TIMESTAMP - A timestamp between midnight, January 1, 1970 and sometime in 2037.


This looks like the previous DATETIME format, only without the hyphens between
numbers; 3:30 in the afternoon on December 30th, 1973 would be stored as
19731230153000 ( YYYYMMDDHHMMSS ).
4) TIME - Stores the time in HH:MM:SS format.
5) YEAR(M) - Stores a year in 2-digit or 4-digit format. If the length is specified as 2 (for
example YEAR(2)), YEAR can be 1970 to 2069 (70 to 69). If the length is specified as 4,
YEAR can be 1901 to 2155. The default length is 4.

String Types:
Most data you'll store will be in string format. This list describes the common string datatypes in
MySQL.
1) CHAR(M) - A fixed-length string between 1 and 255 characters in length (for example
CHAR(5)), right-padded with spaces to the specified length when stored. Defining a length is
not required, but the default is 1.
2) VARCHAR(M) - A variable-length string between 1 and 255 characters in length; for
example VARCHAR(25). You must define a length when creating a VARCHAR field.
3) LOB or TEXT - A field with a maximum length of 65535 characters. BLOBs are
"Binary Large Objects" and are used to store large amounts of binary data, such as images or
other types of files. Fields defined as TEXT also hold large amounts of data; the difference
between the two is that sorts and comparisons on stored data are case sensitive on BLOBs and
are not case sensitive in TEXT fields. You do not specify a length with BLOB or TEXT.
5) TINYBLOB or TINYTEXT - A BLOB or TEXT column with a maximum length of
255 characters. You do not specify a length with TINYBLOB or TINYTEXT.
6) MEDIUMBLOB or MEDIUMTEXT - A BLOB or TEXT column with a maximum
length of 16777215 characters. You do not specify a length with MEDIUMBLOB or
MEDIUMTEXT.
7) LONGBLOB or LONGTEXT - A BLOB or TEXT column with a maximum length of
4294967295 characters. You do not specify a length with LONGBLOB or
LONGTEXT.
8) ENUM - An enumeration, which is a fancy term for list. When defining an ENUM, you
are creating a list of items from which the value must be selected (or it can be NULL). For
example, if you wanted your field to contain "A" or "B" or "C", you would define your ENUM
as ENUM ('A', 'B', 'C') and only those values (or NULL) could ever populate that field.

Appendix II
While starting the Apache server, if port default port (80) is already being used by some other
application, it would display an error in XAMPP Control Panel As shown in Figure 23. We can
change the port by performing the following steps,

1. Open The XAMPP control panel from C:\xampp\xampp-control.exe.

Department of Computer Science, Page 24


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Figure 1: Xampp Startup

In 80 is in use then you will click on “Config” button infront of “Apache”, select “httpd.conf”
from the menu. Httpd.conf file will be opened in NotePad, Find “Listen 80” and change the port
80 to someother value of your choice. i.e. 8082.

Department of Computer Science, Page 25


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Figure 2

Figure 3

In 443 is in use then you will click on “Config” button infront of “Apache”, select “httpd-
ssl.conf” from the menu.
Httpd-ssl.conf file will be opened in NotePad, Find “Listen 443” and change the port 443 to
someother value of your choice. i.e. 444,

Department of Computer Science, Page 26


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Figure 4

Figure 5

Department of Computer Science, Page 27


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Figure 6

11.1.1.1 Start Apache and MySql.

Figure 7

Department of Computer Science, Page 28


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

Appendix III

1. HOW TO READ SQL SYNTAX


Following notations are used when defining generic SQL statement for MySQL. We will be
seeing these in our upcoming labs so we must know “what they are” and “how to read them”.

1.1. < > Angle brackets:


Angle brackets surround the names of syntactic elements. The brackets are not part of the syntax;
do not include them in your SQL statement. You will replace them with identifiers/names.
Example:
Consider the following generic SQL statement for creating a database
CREATE DATABASE <database_name> >
Now we will use this statement by replacing the angle brackets with our database
name(identifier) as
CREATE DATABASE my_database .

1.2. [ ] Square brackets:


Square brackets surround optional syntax. You may choose whether or not to omit such syntax
when forming an SQL statement. The brackets are not part of the syntax; do not include them in
your SQL statement.
Example:
Consider the following generic SQL statement for creating a database
CREATE DATABASE [IF NOT EXISTS] <database_name>
Now we will use this statement by replacing the angle brackets with our database
name(identifier) as either
CREATE DATABASE my_database OR CREATE DATABASE IF NOT EXISTS
my_database

1.3. { } Braces:
Braces surround mandatory syntax groupings. You must include the entire grouping when
forming an SQL statement. The braces are not part of the syntax; do not include them in your
SQL statement.
Example:
Consider the following generic SQL statement for selecting records from a table
SELECT * FROM <table_name> [ {WHERE <criteria>} ]
Now we will use this statement by replacing the angle brackets with our table name(identifier)
and “WHERE <criteria>” as either
SELECT * FROM my_table OR SELECT * FROM my_table WHERE somefield=10

Department of Computer Science, Page 29


C.U.S.T.
Lab 01: Introduction to SQL Tools and Data Definition Language (CREATE)

1.4. () Small Brackets:


Small brackets are part of syntax and you will write them in your SQL statement as they are.

1.5. | The vertical:


Bar separates groups of syntactic elements. You must choose one of the elements when forming
an SQL statement. The vertical bar is not part of the syntax; do not include it in your SQL
statement.
Example:
Consider the following generic SQL statement for creating a table
CREATE TABLE <Table name> (<Column name> {INTEGER | CHARACTER(5)})

Now we will use this statement as

CREATE TABLE my_table (id INTEGER)


OR
CREATE TABLE my_table (id CHARACTER(5))

1.6. ... Elipsis:


An ellipsis following a syntactic element indicates that the syntax is repeatable. You may include
the element as often as you wish when forming an SQL statement. The ellipsis is not part of the
syntax; do not include it in your SQL statement.

1.7. Blank spaces:


(whether single or multiple spaces and/or line breaks) separate syntactic elements.

Example:
Consider the following generic SQL statement for creating a table
INSERT INTO <table_name> (column1Name, ..., columnNName) VALUES
(column1Value, ..., columnNValue)

Now we will use this statement as

INSERT INTO my_table (id, age, password) VALUES (2,20,abdcdef)

Department of Computer Science, Page 30


C.U.S.T.

You might also like