SQL Programming Articles

SQL(Structured Query Language) is a standard programming language for storing, manipulating, and retrieving data in databases. Generally speaking, SQL is a relatively simple language, learners can expect to become familiar with the basics within two to three weeks. Certainly, if you're planning on using SQL skills at work, you'll probably need a higher level of fluency. SQL is still worth learning, knowing the fundamentals of more general languages like Python or R is critical.

The following articles are the newest and most popular questions about SQL.

1. Splitting SQL Column into Multiple Columns Based on Value

2. How to Combine Two Completely Different SQL Queries into One Result

3. Query City Names Starting and Ending With Vowels

4. How to Make SQL Query Result Show With 2 Decimals

5. How to Select All the Columns of a Table Except One Column

6. How to Concatenate Many Rows With Same Id in SQL

7. Sql: Update Column With Increment Numbers Based on 2 Columns

8. How to Use SQL Like Condition With Multiple Values in Postgresql

9. Select Every Employee That Has a Higher Salary Than the Average of His Department

10. Better Techniques for Trimming Leading Zeros in SQL Server

11. How to Include Results of SQL Count If Count=0

12. How to Check If Field Is Null or Empty in MySQL

13. Getting Student Name With Highest Total Mark in SQL

14. Remove Decimal Values Using SQL Query

15. SQL Merge Two Rows With Same Id But Different Column Values (Oracle)

16. How to Get the Numeric Part from a String Using T-Sql

17. Getting Two Counts and Then Dividing Them

18. Column Is of Type Timestamp Without Time Zone But Expression Is of Type Character

19. Exclude a Column Using Select * [Except Columna] from Tablea

20. How to Check If More Than One Column Is Not Null Per Record

21. Fetching Rows Added Last Hour

22. How to Get Textual Contents from Blob in Oracle SQL

23. SQL Query to Get the Employee Name and Their Manager Name from the Same Table

24. Count All Records Per Day in a Specific Month

25. Oracle Sql: Extracting Text Between Two Characters

26. Find Records from One Table Which Don't Exist in Another

27. How to Check If Value Is Inserted Successfully or Not

28. Database Corruption With Mariadb:Table Doesn't Exist in Engine

29. Select Distinct Records on a Join

30. How to Get the Last 12 Months from the Current Date

31. How to Convert Yyyy-Mm-Dd Hh:Mm:Ss to Mm-Dd-Yyyy Hh:Mm:Ss in SQL Server

32. Subtract Values from Two Columns in SQL Query

33. How to Make a Join of 3 Tables in Jpa

34. How to Select Rows With No Matching Entry in Another Table

35. Deleting a Specific Character in a String from a Pattern

36. How to Select Last 5 Rows in a Table Without Sorting

37. How to Find What Privileges a Group Has in Redshift

38. Select and Compare Two Datetime Columns from Different Table Without Having Any Relation

39. Using Where Clause With Two Type of Conditions on Same Column

40. Eliminate Rows Based on Created Timestamp

41. SQL - Sum of Positive and Negative Numbers Using Subquery

42. What's the Best Way to Capitalise the First Letter of Each Word in a String in SQL Server

43. How to Change This View

44. Multiple Rows Output into Variables in MySQL

45. Multiplying Two Columns in SQL Server

46. Combine Multiple Columns from Database into One Column

47. Truncate Seconds and Milliseconds in SQL

48. How to Directly View Blobs in MySQL Workbench

49. SQL Server Query to Find All Permissions/Access for All Users in a Database

50. SQL Server: Check If Variable Is Null and Then Assign Statement for Where Clause

51. How to Select an Empty Result Set

52. SQL Server Pass Column Name as Where Clause Parameter

53. Extracting Data Between Two Delimiters in SQL Server

54. Access Denied for Load Data Infile in MySQL

55. How to Select Multiple Values in One Field MySQL

56. Formatting Numbers by Padding With Leading Zeros in SQL Server

57. Add a Column to Specific Position in Mssql Server

58. Want to Run Multiple SQL Script File in One Go With in Sqlplus

59. Compare 2 Column Values in Same Table

60. Simple Check for Select Query Empty Result

61. SQL to Find Upper Case Words from a Column

62. Convert String to Date in Ms Access Query

63. How to Handle Duplicates Created by Left Join

64. Mysql - How to Use Like on Multiple Columns

65. Find Out Where MySQL Is Installed on MAC Os X

66. Repeat Each Value in SQL Table N Times With 1:N in Different Column

67. Max and Min Sal With Employee Name in One Query

68. Check If a Row Exists, Otherwise Insert

69. SQL Server How to Find the Customers Who Have Bought a Product from Each Store

70. Select Rows Within Last Complete Minute

71. SQL Query for Values Consisting of Only a Specific Character

72. Converting to Timestamp With Time Zone Failed on Athena

73. Nodejs, MySQL - Json Stringify - Advanced Query

74. SQL Select Last N Rows, Sort Them Reversed

75. Deleting Rows from Parent and Child Tables

76. SQL Query Exclude Records

77. SQL String: Counting Words Inside a String

78. How to View SQL Table Structure in Oracle SQL Developer

79. How to Store Emoji Character in MySQL Database

80. Combining Multiple Rows in SQL Server into One

81. Oracle Query to SQL Server Query

82. SQL Group by Age Range

83. Return Dummy Value If No Row Present for in Clause

84. How to Connect MySQL Workbench to Running MySQL Inside Docker

85. Extract String Part Between Single Quotes from Formula'S Divisor

86. SQL Call Stored Procedure for Each Row Without Using a Cursor

87. SQL Count All Word Occurrences from a Table

88. SQL - Update Fierld With Max Date from Another Table

89. Pg Copy Error: Invalid Input Syntax for Integer

90. How to Compare One Field to Another Using Like

91. SQL Average from Multiple Columns

92. How to Set Timezone for Postgres Psql

93. SQL Update Trigger Only When Column Is Modified

94. What Would Be a SQL Query to Remove \N\R from the Text

95. How to Resolve MySQL Error Code: 1292. Truncated Incorrect Double Value

96. Query to Get the Customers Who Haven't Transacted in the Past Two Months

97. How to Identify Rows Where Two Columns Have Match Exactly in SQL Server

98. Joining the Table Conditionally in SQL

99. SQL Max Function Returns One Row When Multiple Rows Have the Same Value

100. Error Code 1292 Incorrect Date Value MySQL

101. The MySQL Extension Is Deprecated and Will Be Removed in the Future: Use MySQLi or Pdo Instead

102. How to (Or Can I) Select Distinct on Multiple Columns

103. Ordering by the Order of Values in a SQL In() Clause

104. Insert With Select

105. Ora-00904: Invalid Identifier

106. How to Create Multiple One to One's

107. How to Force Postgres to Use a Particular Index

108. How to Restore a Dump File from MySQLdump

109. Safely Rename Tables Using Serial Primary Key Columns

110. How to Fetch the Row Count for All Tables in a SQL Server Database

111. Using a Variable in Openrowset Query

112. Is There Ever a Time Where Using a Database 1:1 Relationship Makes Sense

113. SQL Query to Select Distinct Row with Minimum Value

114. Insert Update Stored Proc on SQL Server

115. Create Custom Function for Date Difference Excluding Weekends and Holidays in Oracle SQL

116. "You Tried to Execute a Query That Does Not Include the Specified Aggregate Function"

117. Why Does Using an Underscore Character in a Like Filter Give Me All the Results

118. Improving Performance of Cluster Index Guid Primary Key

119. Get Execution Time of Postgresql Query

120. T-SQL Trim &Nbsp (And Other Non-Alphanumeric Characters)

121. Designing a SQL Schema for a Combination of Many-To-Many Relationship (Variations of Products)

122. Microsoft T-SQL to Oracle SQL Translation

123. Hql: How to Perform an Inner Join on a Subquery

124. What's the Difference Between Charfield and Textfield in Django

125. How to Delete from a Table Where Id Is in a List of Ids

126. Sqlite Inner Join - Update Using Values from Another Table

127. SQL Error: Ora-02291: Integrity Constraint

128. How to Show Column Value Only One Time If It Is Repeated and Blank Until Different Value Comes in SQL

129. Best Way to Store Working Hours and Query It Efficiently

130. Oracle: How to "Group By" Over a Range

131. Inner Join with Count() on Three Tables

132. SQL Script to Find Foreign Keys to a Specific Table

133. Execution Order of Conditions in SQL 'Where' Clause

134. Issues with SQL Comparison and Null Values

135. Error: Invalid Expression in the Select List (Not Contained in Either an Aggregate Function or the Group by Clause)

136. Rails: Get Next/Previous Record

137. How to Reset an MySQL Autoincrement Using a Max Value from Another Table

138. Sql: How to Find Duplicates Based on Two Fields

139. Recursive Query Used for Transitive Closure

140. Window Functions - Running Total with Reset

141. Create a Unique Index on a Non-Unique Column

142. How to Add Number of Business Days to Given Date

143. Find Most Common Elements in Array with a Group By

144. Insert Deleted Values into a Table Before Delete with a Delete Trigger

145. T-Sql: How to Join @Variable Tables (Another Try)

146. Group Query Results by Month and Year in Postgresql

147. Postgresql: Remove Attribute from JSON Column

148. How to Get Week Start and End Date String in Postgresql

149. Cumulating Value of Current Row + Sum of Previous Rows

150. Confusion with Oracle Connect By

151. Executing a Stored Procedure Within a Stored Procedure

152. C# SQL Top as Parameter

153. SQL - Pivot Table and Group by Not Working

154. Are There Downsides to Using Prepared Statements

155. Getting a Dynamically-Generated Pivot-Table into a Temp Table

156. How to Limit the Results on a SQL Query

157. Free Space in MySQL After Deleting Tables & Columns

158. How to Combine These Two SQL Statements

159. Is There a Performance Difference in Using a Group by with Max() as the Aggregate VS Row_Number Over Partition By

160. Exclude Rows Based on Other Rows (Sql)

161. How to Correctly Handle Dates in Queries Constraints

162. How to Make Shiny Reactivity Work with SQL Database

163. Generate Insert Script for Selected Records

164. Postgresql Get a Random Datetime/Timestamp Between Two Datetime/Timestamp

165. MySQL Views - When to Use & When Not To

166. Sql: Count() Based on Column Value

167. Create View Using Linked Server Db in SQL Server

168. Could Not Obtain Information About Windows Nt Group User

169. Sql Localdb Automatic Instance Startup Failure When Called from Visual Studio 2013, But Not SQL Server Management Studio

170. How to Check for The SQL Server Version Using Powershell

171. Oracle Locking with Select...For Update Of

172. Tsql - Some | Any Why Are They Same with Different Names

173. Sql Field with Multiple Id's of Other Table

174. Kill All User Connections in SQL Azure

175. Data Type Equivalents: Ms Access Tables ↔ 'Create Table' Queries ↔ Odbc Sql