Abstract
This chapter discusses structured query language (SQL) with the most basic operation: retrieving information. A database of interest already exists, complete with data, and one wants to query that data. The best way to learn SQL is by doing it. At its simplest, one only needs to tell SELECT two things: the data attributes one wants and the table, where it should get it. The SQL statement fetches the values from a single column, name, from all of the rows in the items table, and displays the results. To retrieve multiple columns, one should specify a comma-delimited list of column names. In the table, there is an order. The order in which the attributes are specified in the column name list determines the order of attributes in the result. The presentation of a NULL value in a result is database management systems specific. Furthermore, SQL has two types of comments. The first type begins with two minus signs ("–") and ends with the end of the line. The second type begins with /*, ends with */, and can span multiple lines. The chapter demonstrates how to extract data from a single table. It specifies the attributes one wants in the SELECT list.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have
Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.