SQL and PL/SQL || Table Structure || Steem Alliance Community.

in Steem Alliance2 years ago

Hello Everyone,


Grey minimalist business project presentation .jpg

Good night everyone, how are you, i hope you all guys will happy and good. By the grace of God, i am also good. Today i am here with new article of SQL and PL/SQL series in which i will cover table structures with selecting and modifying quries . in the previous article , i have already share the 4th different languages that are use for creating inserting and modifying data in table.

Lets start with the basics of SQL tables. In SQL, tables are data stored elements in database. It is used to organize and store data in a relational database. Each table consists of rows and columns where rows represents records and a column represents specific field of the record. In simple word, we can say that it is the shelf of closet to manage the cloth.

First of all, we will select table then dicuss on its structure data. you will see that data will store in the form of rows and columns. it is the first and initial step to learn sql and working in database field. in every project database is essential to store the data according to own requirement.

Select Statement.

Select statement is use to fetch the data from tables. The syntex of select statement is mentioned below. first of all , we look into its syntex and try to understand its structure.

SELECT * FROM TABLE_NAME

we will write the actual table name at the place of 'table_name'. Table creating and data inserting menthods into table has been discussed in the previous post. now we talk about the ( * ) symbol. it is use to get the whole attribute or fields from the table, in simple word word we can say that ( * ) symbol is used to get the specific columns of data rows from table.

for example , I have a table with name "CUSTOMER" and it have 5 fields. the name of fields are ID , NAME , DATE , AMMOUNT , PRODUCT. we suppose that the subjected dummy data exist in field of tables.

IDNAMEDATE_CREATIONAMMOUNTPRODUCT
1ALI SALEEM30-JAN-2021930 RSBALLON
2Waseem10-JUN-2020307 RSCake
3Jogni11-JAN-2021305 RSmobile
4king30-JAN-2023340 RScharger
5vampire20-JAN-2019230 RShandfree
6smith25-SEP-2001340 RSCover

if i want to get the whole data with all columns then we will use the * keyword. if we want to fetch first three columns then we will use its name at the place of * keyword.

image.png
Image Src

Get colums by using alias

we will use the random alphabet or name to give the doublicated short name to table then this short name can also use to get the columns data. Alias are basically use to give any temporary name to tables or columns.

SELECT A.ID , A.NAME , A.DATE_CREATION FROM CUSTOMER A ;

'A' is the alias that i give the temporary name to table. With alias name and columns name, we will get the specific columns.

Result with query.

IDNAMEDATE_CREATION
1ALI SALEEM30-JAN-2021
2Waseem10-JUN-2020
3Jogni11-JAN-2021
4king30-JAN-2023
5vampire20-JAN-2019
6smith25-SEP-2001

It would be my pleasure if you will share your opinion and reviews on this topic

20230310_190323_0000.png

Please cast witness vote to @bangla.Witness or set proxy to @rme.

_
Vote @bangla.witness as witness
Set Proxy @rme as proxy

Special Thanks.

Cc: @rme
Cc: @hungry-griffin
Cc: @pennsif

Thanks for giving your precious time to my post.
Follow | Upvote | Share | Comments
Follow me on Instagram.
Instagram

🆃🅷🅰️🅽🅺 🆈🅾️🆄

Coin Marketplace

STEEM 0.04
TRX 0.33
JST 0.093
BTC 63994.60
ETH 1797.39
USDT 1.00
SBD 0.39