SQL Queries

Senkusha

Student Council President
gemgemgemgemgemgemgem
Staff member
Administrator
Isekai Society
Top Poster Of Month
Joined
20-Jun-2003
Messages
2,203
Age
51
Gender
Female
SQL is a very powerful tool in the hands of a competent developer. I've worked with MySQL for years, and only recently discovered that there's all sort of advanced things you can do with it! Like, just this morning, I learned that you can use REGEX within a WHERE clause. The following query searches for the first character that's not alpha-numeric.

SELECT [I]field_list[/I]
FROM [I]table_name[/I]
WHERE [I]field_name[/I] REGEXP '^[^0-9A-Za-z]';

Last week, I learned that you can store JSON data inside of a column. This is handy to know if you have a variable length dataset (think like a mini-table of values) for each record. SQL can pull up records based on that JSON data! You use JSON_EXTRACT( ) to look at the data.
JSON_SET() to update the data

But doing the INSERT INTO the data is a bit more complicated using the {} symbols as an object.
 
Back
Top