Archiwa kategorii: sql

Komendy SQL

WHERE (Kat_KodSzczegol LIKE ‚lu%’)

Wildcard Description
_ (underscore) matches any single character
% matches a string of one or more characters
[ ] matches any single character within the specified range (e.g. [a-f]) or set (e.g. [abcdef]).
[^] matches any single character not within the specified range (e.g. [^a-f]) or set (e.g. [^abcdef]).
A few examples should help clarify these rules.

WHERE FirstName LIKE ‚_im’ finds all three-letter first names that end with ‚im’ (e.g. Jim, Tim).
WHERE LastName LIKE ‚%stein’ finds all employees whose last name ends with ‚stein’
WHERE LastName LIKE ‚%stein%’ finds all employees whose last name includes ‚stein’ anywhere in the name.
WHERE FirstName LIKE ‚[JT]im’ finds three-letter first names that end with ‚im’ and begin with either ‚J’ or ‚T’ (that is, only Jim and Tim)
WHERE LastName LIKE ‚m[^c]%’ finds all last names beginning with ‚m’ where the following (second) letter is not ‚c’.

źródło http://msdn.microsoft.com/en-us/library/bb264565(v=sql.90).aspx

itd

po polsku http://kursy.skryptoteka.pl/kurs,10,sql.html

 

więcej na

http://www.1keydata.com/sql/sqlorderby.html