Computer Programming: Learn Any Programming Language In 2 Hours by Cooper Alvin

Computer Programming: Learn Any Programming Language In 2 Hours by Cooper Alvin

Author:Cooper Alvin [Alvin, Cooper]
Language: eng
Format: azw3
Published: 2018-02-14T16:00:00+00:00


98701

Rohan

45

50000.00

98675

Amit

32

37000.00

98706

Shayla

22

42005.00

98718

Mathews

37

12000.00

If you wish to retrieve the first 2 records from the table CUST, then the query for the same is as follows –

SELECT TOP 2 * FROM CUST;

Upon execution, the following result shall be generated.

ID

Name

Age

Salary

98701

Rohan

45

50000.00

98675

Amit

32

37000.00

In case you are using MySQL, the query needs to slightly changed and the new query will look like this –

SELECT * FROM CUST LIMIT 2;

Lastly, if Oracle is being used as the base RDBMS for running these queries, the query will be –

SELECT * FROM CUST WHERE ROWNUM <= 2;

The execution of the last two commands will generate the same result as that generated for the TOP clause.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.