GKsea.com image

Serving the world with Accurate GK and Current Affairs

Advertisements

Syntax of SQL SELECT Statement


SQL SELECT FORMAT
SELECT statement is the most used statement while handling databases. SELECT statement is used to retrieve data back from database for use.

General syntax of SELECT statement

SELECT * FROM table_name;

Here replace the table_name with the name of table you want to retrieve data from. * denotes that user want to include all columns of the table. Using this statement all the data of a table will be printed in output window.

For Example: we have a table student in the database as below:

StudentIDStudentNameCityMobile
1001GautamJaipur9898988989
1002AliGoa9898988988
1003UpenMeerut9898988900
1004PuneetGoa9898988088
1005KarishmaMeerut9898958988
1006DimpiGoa9898988981
1007PreetamMeerut9898988985
1008SaurabhGoa9898988987
1009NishantGoa9898988986
1010SonaliDelhi9898988912
1010UmangDelhi989898894


Now if we write SELECT * FROM student;
Then Output will come as:
StudentIDStudentNameCityMobile
1001GautamJaipur9898988989
1002AliGoa9898988988
1003UpenMeerut9898988900
1004PuneetGoa9898988088
1005KarishmaMeerut9898958988
1006DimpiGoa9898988981
1007PreetamMeerut9898988985
1008SaurabhGoa9898988987
1009NishantGoa9898988986
1010SonaliDelhi9898988912
1010UmangDelhi989898894

Previous Chapter|Next Chapter

Must Check


Advertisements

footer

Advertisements

Copyright© 2013-2015 Gksea.com. Powered by dataNcode | Disclaimer and Terms

Contact Us Mail Us