0% found this document useful (0 votes)
18 views

Database

The document outlines steps to create a database and table, add a primary key, and use a SELECT statement to fetch records from the table where a condition on marks is greater than 70.

Uploaded by

MI K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
18 views

Database

The document outlines steps to create a database and table, add a primary key, and use a SELECT statement to fetch records from the table where a condition on marks is greater than 70.

Uploaded by

MI K
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

Step1: CREATE DATABASE <DB_name> (to create database)

Step2: CREATE TABLE <tbl_name> (field_list TYPE,) (to create table)

Step 3: ALTER TABLE <tbl_name> ADD PRIMARY KEY (field_name) (to add primary
key)

Fetch: SELECT <field_list> FROM <tabl_name> WHERE <logic> ORDER BY


<field_name> ASC/DESC

St_ID name class marks

Fetch records of students whose marks greater than 70

SELECT st_ID, name, class, marks FROM student WHERE marks > 70

You might also like