...
Find all
Code Block language sql theme Confluence findAllCustomer() { select * from Customer }
Alternativ erlaubte Schreibweise:
Code Block language sql theme Confluence findAllCustomer() { from Customer }
Where Condition
Code Block language sql theme ConfluenceDJango findAllCustomerWhere() { select * from Customer where city = "London" }
Where Condition mit Parameter
Code Block language sql theme Confluence findAllCustomerWhere(String city) { select * from Customer where city = :city }
Als Parameter können auch Objekte übergeben werden:
Code Block language sql theme Confluence findAllCustomerWhere(Customer customer) { select * from Customer where customer = :customer }
Like Operator
Code Block language sql theme Confluence findAllCustomerLike() { select * from Customer where city like "%L" }
Concat Funktion
Code Block language sql theme Confluence findAllCustomerLike(String city) { select * from Customer where city like concat("%", :city) }
Rückgabe bestimmter Spalten
Code Block language sql theme Confluence findAllCustomerColumn() { select customerid, city, address from Customer }
- asdfasf
...