Breaking News

Script for database (Select one table in database)

Example of database table :
The table name is University

CodeNamesValue
A01Leo90
A02Aries100
A03Taurus95

  • Select all rows all fields 
SELECT * FROM Table_name
Example 
SELECT * FROM University
The display is :
A01Leo90
A02Aries100
A03Taurus95

  • Select all rows one fields
SELECT Field_name FROM Table_name
Example 
SELECT Names FROM University
The display is :
Leo
Aries
Taurus

  • Select any rows all fields or one row all fields (use where)
SELECT * FROM Table_name
WHERE  Condition
Example 
SELECT * FROM University
WHERE Names = 'Aries'
The display is :
A02Aries100

No comments