oop - SQL table objects -
i not sure if call them objects, on codecademy lesson here used letter f, did not explain heck was. furthermore, if indeed object, i.e. copy understand, how can use greater conditions on properties same? sorry overwhelm much. please kind explain. following excerpt lesson:
for instance, assuming flight_id increments each additional flight, use following query view flights carrier, flight id, , sequence number:
select carrier, id, (select count(*) flights f f.id < flights.id , f.carrier=flights.carrier) + 1 flight_sequence_number flights;
it's alias table can reference f.carrier
or f.id
instead of using flights.carrier
or flights.id
in subquery.
http://technet.microsoft.com/en-us/library/ms187455(v=sql.105).aspx
Comments
Post a Comment