sql query examples

Solutions on MaxInterview for sql query examples by the best coders in the world

showing results for - "sql query examples"
Lena
30 May 2016
1SELECT  'test1' AS [@class]
2    , ( SELECT  'test2' as [@class]
3        , (SELECT 'Name' FOR XML PATH(''))
4        FOR XML PATH('td'), type)
5    ,(SELECT  'test3' as [@class]
6        , (SELECT 'Value' FOR XML PATH(''))
7        FOR XML PATH('td'), type) 
8FOR XML PATH('tr'), type
Deborah
01 Nov 2020
1select [all/distinct] <COL1>, <COL2>, <COL3>
2from <TABLE_NAME>
3[join <JOIN_CONDITION>]
4[where <CONDITION>]
5[group by <COLUMN_NAME>]
6[having <SEARCH_CONDITION>]
7[order by <SORT_SPECIFICATION>]
8
9
10/*
11Specifically for SQL -> Oracle
12
13LEGEND: 
14[...]   :   optional entries
15<...>   :   your specific entry
16*/
Ashley
19 Apr 2017
1SELECT * FROM users;
Isabell
11 Jan 2018
1select * from DUAL;
Sohan
06 Jan 2018
1SELECT columname FROM tablename
Giuseppe
13 Mar 2019
1Select REGEXP FROM DUAL
similar questions
queries leading to this page
sql query examples