<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="https://dotclear.placeoweb.com/feed/rss2/xslt" ?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>PlaceOweb Dotclear - Mot-clé - sql</title>
    <link>https://dotclear.placeoweb.com/</link>
    <atom:link href="https://dotclear.placeoweb.com/feed/tag/sql/rss2" rel="self" type="application/rss+xml" />
    <description></description>
    <language>fr</language>
    <pubDate>Wed, 20 May 2026 15:53:59 +0200</pubDate>
    <copyright></copyright>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <generator>Dotclear</generator>
          <item>
        <title>mysql fonction pour supprimer les balises html</title>
        <link>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html</link>
        <guid isPermaLink="false">urn:md5:ca09a0480c24f2a089863c37776ffa91</guid>
        <pubDate>Sat, 08 May 2021 18:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;J'ai eu le même besoins que &lt;a href=&quot;https://stackoverflow.com/questions/38686923/how-to-remove-html-tags-except-br-from-mysql-data/38686974&quot;&gt;How to remove html tags except &amp;lt;br&amp;gt; from mysql data?&lt;/a&gt;, &lt;a href=&quot;https://stackoverflow.com/questions/2627940/remove-html-tags-from-record/13347316#13347316&quot;&gt;Remove HTML tags from record&lt;/a&gt; et &lt;a href=&quot;https://stackoverflow.com/questions/38868364/sql-remove-all-html-tags-in-a-string/38868776&quot;&gt;SQL - Remove all HTML tags in a string&lt;/a&gt;&lt;/p&gt; &lt;p&gt;DELIMITER mydelimiter
CREATE FUNCTION `strip_tags`($str text) RETURNS text DETERMINISTIC
BEGIN
    DECLARE $start, $end INT DEFAULT 1;
    LOOP
        SET $start = LOCATE(&quot;&lt;&quot;, $str, $start);
        IF (!$start) THEN RETURN $str; END IF;
        SET $end = LOCATE(&quot;&gt;&quot;, $str, $start);
        IF (!$end) THEN SET $end = $start; END IF;
        SET... &lt;a href=&quot;https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; mysql fonction pour supprimer les balises html&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/mysql-fonction-pour-supprimer-les-balises-html#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/774</wfw:commentRss>
              </item>
          <item>
        <title>Data Types SQL langages de programmation INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT</title>
        <link>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation</link>
        <guid isPermaLink="false">urn:md5:5f6e2ae82218dff02faf87e63c7da4fa</guid>
        <pubDate>Sat, 05 Sep 2020 11:35:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>csharp</category>
                  <category>java</category>
                  <category>javascript</category>
                  <category>mysql</category>
                  <category>php</category>
                  <category>sql</category>
                <description>&lt;p&gt;Quels sont les types SQL et des langages de programmation JAVA, PHP, Javascript, ...&lt;/p&gt; &lt;p&gt;Types MySQL
Types MySQL (par défaut)
Taille (en octet)
Valeur min
Valeur max
JAVA



TINYINT
tinyint(4)
1
-128
127
byte :   (1 octet ) entiers compris entre -128 et +127 (-2^7 et 2^7-1)



TINYINT (unsigned)
tinyint(3) UNSIGNED
1
0
255




SMALLINT
smallint(6)
2
-32.768
32.767
short :  (2 octets ) entiers compris entre -32768 et +32767 (-2^15 et... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Data Types SQL langages de programmation INTEGER, INT, SMALLINT, TINYINT, MEDIUMINT, BIGINT&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Data-Types-SQL-langages-de-programmation#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/759</wfw:commentRss>
              </item>
          <item>
        <title>Node.js</title>
        <link>https://dotclear.placeoweb.com/post/nodejs</link>
        <guid isPermaLink="false">urn:md5:24df80a20c1a0ccf91bfc0b7d87dbff5</guid>
        <pubDate>Sat, 21 Dec 2019 19:23:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>Javascript</category>
                          <category>HTML5</category>
                  <category>javascript</category>
                  <category>nodejs</category>
                  <category>sql</category>
                <description>&lt;p&gt;&lt;a href=&quot;https://nodejs.org/fr/&quot;&gt;Node.js&lt;/a&gt; JavaScript runtime&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;https://nodejs.org/api/&quot;&gt;API reference documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;https://nodejs.org/fr/docs/guides/&quot;&gt;Guides&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Versions : &lt;a href=&quot;https://github.com/nodejs/Release&quot;&gt;Node.js Release&lt;/a&gt; et &lt;a href=&quot;https://nodejs.org/en/about/releases/&quot;&gt;Releases&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;Installation de Node.js


Lors de l'installation de Node.js, vous aurez les binaires :

npm  : Node Package Manager, le gestionnaire de packets pour Node. Le site npm pour chercher des packages
node : le binaire de Node


$ node -v
v12.18.3     v14.9.0

$ npm -v
6.14.6       6.14.8


Download for Windows (x64)
14.15.0 LTS : Recommended For Most... &lt;a href=&quot;https://dotclear.placeoweb.com/post/nodejs&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Node.js&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/nodejs#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/nodejs#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/749</wfw:commentRss>
              </item>
          <item>
        <title>Android SQlite</title>
        <link>https://dotclear.placeoweb.com/post/Android-SQlite</link>
        <guid isPermaLink="false">urn:md5:af6c4f2263f37b0cf5fd0e3ad583fe6d</guid>
        <pubDate>Sat, 05 Nov 2016 23:43:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>JAVA</category>
                          <category>android</category>
                  <category>java</category>
                  <category>sql</category>
                  <category>sqlite</category>
                <description>&lt;p&gt;Android SQlite&lt;/p&gt; &lt;p&gt;Android SQLite database and content provider - Tutorial

It is good practice to create a separate class per table.
Thread Safety. If you work directly with databases and have multiple writers from different threads you may run into concurrency issues. The easiest way is to use the keyword synchronized in front of all methods of the provider, so... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Android-SQlite&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Android SQlite&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Android-SQlite#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Android-SQlite#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/689</wfw:commentRss>
              </item>
          <item>
        <title>SQL &quot;matching found rows&quot; vs &quot;affected rows&quot;</title>
        <link>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows</link>
        <guid isPermaLink="false">urn:md5:ee033adb9f0c28652d664ec8a120f50a</guid>
        <pubDate>Sat, 05 Nov 2016 20:25:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>android</category>
                  <category>java</category>
                  <category>javaEE</category>
                  <category>mariadb</category>
                  <category>mysql</category>
                  <category>php</category>
                  <category>sql</category>
                  <category>sqlite</category>
                <description>&lt;p&gt;Lors de modifications (UPDATE, DELETE) comment différencier le nombre d'enregistrement qui matche au critère WHERE et le nombre d'enregistrement réellement modifiés par la requête ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&quot;found (matched) rows&quot; le nombre d'enregistrements trouvés (potentiellement modifiable)&lt;/li&gt;
&lt;li&gt;&quot;affected (changed) rows&quot; le nombre d'enregistrements véritablement changés parmi les trouvés&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;En introduction, la conclusion

client MariaDB/MySQL : &quot;affected (changed) rows&quot; par défaut.
client SQLite : &quot;found (matched) rows&quot; uniquement ! pas moyen de le changer ?...
PHP + MariaDB/MySQL : &quot;affected (changed) rows&quot; par défaut, possibilité de passer en &quot;found (matched) rows&quot; avec l'option PDO::MYSQL_ATTR_FOUND_ROWS =&gt; true dans le connecteur... &lt;a href=&quot;https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; SQL &amp;quot;matching found rows&amp;quot; vs &amp;quot;affected rows&amp;quot;&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/SQL-matching-found-rows-vs-affected-rows#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/688</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB variables</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-variables</link>
        <guid isPermaLink="false">urn:md5:5205aa10143b3977c75fcb01a3cb7a46</guid>
        <pubDate>Sun, 12 Jun 2016 12:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Accès aux variables de status, système, session, globales, utilisateur.&lt;/p&gt; &lt;p&gt;Server Status Variables utiliser SHOW STATUS pour voir le status des variables.
Server System Variables utiliser SHOW VARIABLES pour lister leur valeur ou le format avec 2 @ : @@event_scheduler
User-defined Variables avec un seul @ : @ma_variable


-- SHOW [GLOBAL | SESSION] STATUS [LIKE 'pattern' | WHERE expr]
SHOW STATUS; -- par défaut SESSION,... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-variables&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB variables&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-variables#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-variables#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/678</wfw:commentRss>
              </item>
          <item>
        <title>Réplication MariaDB</title>
        <link>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB</link>
        <guid isPermaLink="false">urn:md5:12c8359ee561c90c92e126b3f60ba24f</guid>
        <pubDate>Sun, 05 Jun 2016 19:48:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Petites notes sur la réplication avec MariaDB&lt;/p&gt; &lt;p&gt;Quel serait la meilleure méthode de réplication ?

SBR : Statement Based Replication
RBR : Row Based Replication
MBR ? Mixed Based Replication



MariaDB



Binary Log Formats
Replication and Binary Log Server System Variables replicate_ignore_db
mysqld Options --binlog-ignore-db
Dynamic Replication Variables SET GLOBAL replicate_ignore_db =... &lt;a href=&quot;https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Réplication MariaDB&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/R%C3%A9plication-MariaDB#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/677</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB DEFAULT column VALUE</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-default-column-value</link>
        <guid isPermaLink="false">urn:md5:7d67cb721032f4cd274fb8bd365df374</guid>
        <pubDate>Tue, 10 May 2016 21:15:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>sql</category>
                <description>&lt;p&gt;How to retrieve default column value ?
Simply using the miscellaneous &lt;a href=&quot;https://mariadb.com/kb/en/mariadb/default&quot;&gt;DEFAULT(col_name)&lt;/a&gt; function.&lt;/p&gt; &lt;p&gt;UPDATE my_table SET my_col_1 = DEFAULT(my_col_1), my_field = DEFAULT(my_field) WHERE id = 123... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-default-column-value&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB DEFAULT column VALUE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-default-column-value#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-default-column-value#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/675</wfw:commentRss>
              </item>
          <item>
        <title>Android SQlite affectedRows</title>
        <link>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows</link>
        <guid isPermaLink="false">urn:md5:06a82daac5cf49d91aa9a4045347e897</guid>
        <pubDate>Sun, 01 May 2016 10:52:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>android</category>
                  <category>java</category>
                  <category>javaEE</category>
                  <category>php</category>
                  <category>sql</category>
                  <category>sqlite</category>
                <description>&lt;p&gt;Les INSERT/DELETE/UPDATE retourne the number of rows affected, mais pas les bons ! Pour résumer il retourne le nombre de row matching au critère WHERE.&lt;/p&gt; &lt;p&gt;ContentValues values = new ContentValues();
values.put(&quot;changed&quot;, changed ? &quot;1&quot; : &quot;0&quot;);
long affectedRows = database.update(&quot;my_table&quot;, values, &quot;id = ?&quot;, new String[]{Integer.toString(id)});

Sur une clé primaire avec un seul row attendu et existant, cette méthode, retourne toujours 1,

que la valeur d’origine soit différente
que la valeur... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Android SQlite affectedRows&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Android-SQlite-affectedRows#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/685</wfw:commentRss>
              </item>
          <item>
        <title>REPLACE INTO vs ON DUPLICATE KEY UPDATE</title>
        <link>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE</link>
        <guid isPermaLink="false">urn:md5:5a4a6a50e2fcc9de5a2af37d1046b985</guid>
        <pubDate>Mon, 04 Apr 2016 00:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Which (non-standard) statement is better faster?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;REPLACE INTO ...&lt;/li&gt;
&lt;li&gt;INSERT INTO ... ON DUPLICATE KEY UPDATE ...&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;REPLACE INTO my_table (col_1, col_2, col_3, col_4) VALUES 
('row1_valA', 'row1_valB', 'row1_valC', 'row1_valD'),
('row2_valA', 'row2_valB', 'row2_valC', 'row2_valD');

INSERT INTO my_table (col_1, col_2, col_3, col_4) VALUES
('row1_valA', 'row1_valB', 'row1_valC', 'row1_valD'),
('row2_valA', 'row2_valB', 'row2_valC', 'row2_valD')
ON DUPLICATE KEY... &lt;a href=&quot;https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; REPLACE INTO vs ON DUPLICATE KEY UPDATE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/REPLACE-INTO-vs-ON-DUPLICATE-KEY-UPDATE#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/665</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB Connector/Java You need to set exactly 1 parameters on the prepared statement</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-Connector/Java-You-need-to-set-exactly-1-parameters-on-the-prepared-statement</link>
        <guid isPermaLink="false">urn:md5:3217fa6b7f3473fd011458e4b436d708</guid>
        <pubDate>Sat, 02 Apr 2016 14:42:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>JAVA</category>
                          <category>java</category>
                  <category>javaEE</category>
                  <category>mariadb</category>
                  <category>sql</category>
                <description>&lt;pre&gt;
Exception in thread &amp;quot;main&amp;quot; java.sql.SQLException: You need to set exactly 1 parameters on the prepared statement
Query is : INSERT INTO my_table (my_col) VALUES ('m_val')null;
Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: You need to set exactly 1 parameters on the prepared statement
Query is : INSERT INTO my_table (my_col) VALUES ('m_val')null;
&lt;/pre&gt; &lt;p&gt;After MariaDB Connector/Java (CONJ) version 1.3.6 (since 1.3.7 and 1.4.0), the INSERT INTO my_table (my_col) VALUES ('my_val') failed :


Exception in thread &quot;main&quot; java.sql.SQLException: You need to set exactly 1 parameters on the prepared statement
Query is : INSERT INTO my_table (my_col) VALUES ('my_val')null
	at... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-Connector/Java-You-need-to-set-exactly-1-parameters-on-the-prepared-statement&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB Connector/Java You need to set exactly 1 parameters on the prepared statement&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-Connector/Java-You-need-to-set-exactly-1-parameters-on-the-prepared-statement#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-Connector/Java-You-need-to-set-exactly-1-parameters-on-the-prepared-statement#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/664</wfw:commentRss>
              </item>
          <item>
        <title>sql occurence char count</title>
        <link>https://dotclear.placeoweb.com/post/sql-occurence-char-count</link>
        <guid isPermaLink="false">urn:md5:cbbbb78949b6823141f22c91690eff77</guid>
        <pubDate>Tue, 08 Mar 2016 20:33:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Comment compter le nombre d’occurrence d'un caractère dans une colonne ?&lt;/p&gt;

&lt;pre class=&quot;brush: sql&quot;&gt;SET @string = &amp;quot;Bonjour &amp;quot;&amp;quot;Mr Vinal&amp;quot;&amp;quot;; il fait beau l'été, l'automne et l'hivers, n'est ce pas ?&amp;quot;;
SELECT 
SUM( LENGTH(@string ) ) AS total_length,
SUM( LENGTH(@string) - LENGTH(replace(@string, ',', '')) ) AS coma_virgule, 
SUM( LENGTH(@string) - LENGTH(replace(@string, '''', '')) ) AS quote_cote, 
SUM( LENGTH(@string) - LENGTH(replace(@string, '&amp;quot;', '')) ) AS double_quote_cote, 
SUM( LENGTH(@string) - LENGTH(replace(@string, ';', '')) ) AS semicolon_point_virgule
;
/*
+--------------+--------------+------------+-------------------+-------------------------+
| total_length | coma_virgule | quote_cote | double_quote_cote | semicolon_point_virgule |
+--------------+--------------+------------+-------------------+-------------------------+
|           79 |            2 |          4 |                 2 |                       1 |
+--------------+--------------+------------+-------------------+-------------------------+
*/&lt;/pre&gt; &lt;p&gt;D'autres liens :

http://stackoverflow.com/questions/...
http://stackoverflow.com/questions/...
https://docs.oracle.com/cd/B28359_0...
http://sqlblog.com/blogs/adam_macha...
http://rebustechnologies.com/using-...
http://stanbiron.com/2010/07/29/Sim...... &lt;a href=&quot;https://dotclear.placeoweb.com/post/sql-occurence-char-count&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; sql occurence char count&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/sql-occurence-char-count#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/sql-occurence-char-count#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/660</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB fonctions de date et de temps</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps</link>
        <guid isPermaLink="false">urn:md5:40dd58edc3e95f71a5aad98507fb566d</guid>
        <pubDate>Mon, 28 Dec 2015 21:21:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>sql</category>
                <description>&lt;p&gt;Comment gérer ses dates avec MariaDB, soustraire des dates, ajouter des intervalles de temps, ...&lt;/p&gt;


&lt;p&gt;... extraire les secondes, minutes, jours, semaines, mois, ans...&lt;/p&gt; &lt;p&gt;Au même titre que MySQL fonctions de date et de temps, voici comment gérer les dates et times avec MariaDB, selon Date and Time Functions et Date and Time Data Types

MariaDB&gt; SELECT VERSION(), CURRENT_TIMESTAMP, CURRENT_DATE, CURRENT_TIME, UNIX_TIMESTAMP();... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB fonctions de date et de temps&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB-fonctions-de-date-et-de-temps#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/654</wfw:commentRss>
              </item>
          <item>
        <title>The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.</title>
        <link>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.</link>
        <guid isPermaLink="false">urn:md5:3c30aca11bbab01df3a3161b7fe5bbf4</guid>
        <pubDate>Tue, 01 Dec 2015 06:21:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>java</category>
                  <category>javaEE</category>
                  <category>jboss</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.&lt;/p&gt;


&lt;p&gt;MySQL server has gone away&lt;/p&gt; &lt;p&gt;2015-12-01 09:01:45,010 FATAL (EJB default - 7) class com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications link failure

The last packet successfully received from the server was 13 973 milliseconds ago.  The last packet sent successfully to the server was 3 milliseconds... &lt;a href=&quot;https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; The last packet successfully received from the server was X milliseconds ago.  The last packet sent successfully to the server was Y milliseconds ago.&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/The-last-packet-successfully-received-from-the-server-was-milliseconds-ago.-The-last-packet-sent-successfully-to-the-server-was-milliseconds-ago.#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/649</wfw:commentRss>
              </item>
          <item>
        <title>android.database.Cursor moveToFirst or getCount</title>
        <link>https://dotclear.placeoweb.com/post/android.database.Cursor-moveToFirst-vs-getCount</link>
        <guid isPermaLink="false">urn:md5:bb7df10fc2a3c8dc5a15b157942d41d0</guid>
        <pubDate>Mon, 28 Sep 2015 21:44:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>JAVA</category>
                          <category>android</category>
                  <category>sql</category>
                <description>&lt;p&gt;moveToFirst vs getCount ? Wich is faster on &lt;a href=&quot;http://developer.android.com/reference/android/database/Cursor.html&quot;&gt;android.database.Cursor&lt;/a&gt; ?&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/database/Cursor.html#moveToFirst()&quot;&gt;moveToFirst()&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.android.com/reference/android/database/Cursor.html#getCount()&quot;&gt;getCount()&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt; &lt;p&gt;It's almost the same time because Cursor.moveToFirst() call SQLiteCursor.getCount().


Look at

GrepCode / com.google.android / android
android.database.AbstractCursor
GrepCode / com.google.android / android /  5.1.1_r1 / android.database.AbstractCursor
GrepCode / com.google.android / android /  5.1.1_r1 / android.database.AbstractCursor
GrepCode /... &lt;a href=&quot;https://dotclear.placeoweb.com/post/android.database.Cursor-moveToFirst-vs-getCount&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; android.database.Cursor moveToFirst or getCount&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/android.database.Cursor-moveToFirst-vs-getCount#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/android.database.Cursor-moveToFirst-vs-getCount#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/637</wfw:commentRss>
              </item>
          <item>
        <title>sql_log.sh</title>
        <link>https://dotclear.placeoweb.com/post/sql_log.sh</link>
        <guid isPermaLink="false">urn:md5:91450c1834bf455b54e525f3613b2b02</guid>
        <pubDate>Sat, 19 Sep 2015 19:15:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Petit script pour activer les logs des requêtes SQL (MariaDB, MySQL).&lt;/p&gt;


&lt;p&gt;Usage :&lt;/p&gt;


&lt;p&gt;./sql_log.sh OFF&lt;/p&gt;


&lt;p&gt;./sql_log.sh ON&lt;/p&gt;


&lt;p&gt;tail -f /var/lib/mysql/hostname.log&lt;/p&gt; &lt;p&gt;~# vim sql_log.sh

#!/bin/bash

#echo $1
#echo $*
#echo $@
#echo $#

# Le nombre d'arguments : $#
#echo $#

var_on_off=&quot;&quot;;

if [ $# = 1 ]
then
        if [ $1 = &quot;ON&quot; ]
        then
                var_on_off=$1;
        elif [ $1 = &quot;OFF&quot; ]
        then
                var_on_off=$1;
        else
                echo &quot;Un seul ARG : ON/OFF&quot;;... &lt;a href=&quot;https://dotclear.placeoweb.com/post/sql_log.sh&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; sql_log.sh&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/sql_log.sh#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/sql_log.sh#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/704</wfw:commentRss>
              </item>
          <item>
        <title>MySQL create command SELECT/INSERT/UPDATE</title>
        <link>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE</link>
        <guid isPermaLink="false">urn:md5:065f55763647c25d4a1640c4a318420b</guid>
        <pubDate>Sun, 18 Jan 2015 23:30:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Commandes SQL pour générer des statements SELECT, INSERT, REPLACE, UPDATE de vos tables, dans le but d'avoir les requêtes déjà prêtes avec la liste de vos champs.&lt;/p&gt; &lt;p&gt;/* 
`information_schema`.`COLUMNS`
TABLE_CATALOG
TABLE_SCHEMA
TABLE_NAME
COLUMN_NAME
ORDINAL_POSITION
COLUMN_DEFAULT
IS_NULLABLE
DATA_TYPE
CHARACTER_MAXIMUM_LENGTH
CHARACTER_OCTET_LENGTH
NUMERIC_PRECISION
NUMERIC_SCALE
CHARACTER_SET_NAME
COLLATION_NAME
COLUMN_TYPE
COLUMN_KEY
EXTRA
PRIVILEGES
COLUMN_COMMENT
*/


-- SET [SESSION | GLOBAL]... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MySQL create command SELECT/INSERT/UPDATE&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MySQL-create-command-SELECT/INSERT/UPDATE#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/628</wfw:commentRss>
              </item>
          <item>
        <title>MariaDB</title>
        <link>https://dotclear.placeoweb.com/post/MariaDB</link>
        <guid isPermaLink="false">urn:md5:b3ed8e47c78af314480c704feba895dc</guid>
        <pubDate>Mon, 31 Mar 2014 11:18:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mariadb</category>
                  <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;&lt;a href=&quot;https://mariadb.org/&quot;&gt;MariaDB&lt;/a&gt; remplaçant de &lt;a href=&quot;https://dotclear.placeoweb.com/tag/mysql&quot;&gt;MySQL&lt;/a&gt; ?&lt;/p&gt; &lt;p&gt;Au 2014-03-31, MariaDB lance sa nouvelle version stable : MariaDB 10.0.10


Les commandes client mysql/mariadb


Par exemple pour le lancer sans la complétion et avec demande du mot de passe, mysql --no-auto-rehash -p


Pour changer le prompt :
MariaDB [(none)]&gt; prompt MariaDB&gt;
PROMPT set to 'MariaDB&gt; '
MariaDB&gt;
PROMPT \U &gt;
root@localhost &gt;


Et le... &lt;a href=&quot;https://dotclear.placeoweb.com/post/MariaDB&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; MariaDB&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/MariaDB#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/MariaDB#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/606</wfw:commentRss>
              </item>
          <item>
        <title>Deadlock MySQL</title>
        <link>https://dotclear.placeoweb.com/post/Deadlock-MySQL</link>
        <guid isPermaLink="false">urn:md5:fcdb3a0adc8857bfc8c62675d4e11d40</guid>
        <pubDate>Wed, 25 Dec 2013 19:49:00 +0100</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>sql</category>
                <description>&lt;p&gt;Exception&amp;nbsp;: Deadlock found when trying to get lock; try restarting transaction
com.mysql.jdbc.exceptions.jdbc4.MySQLTransactionRollbackException: Deadlock found when trying to get lock; try restarting transaction&lt;/p&gt;


&lt;p&gt;Exception::getMessage: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction&lt;/p&gt; &lt;p&gt;SHOW INNODB STATUS; -- MySQL 5.1 : 'SHOW INNODB STATUS' is deprecated and will be removed in a future release. Please use 'SHOW ENGINE INNODB STATUS' instead
SHOW ENGINE INNODB STATUS;
 
-- Consultez la section : 
------------------------
LATEST DETECTED DEADLOCK
------------------------


La syntaxe de SHOW INNODB STATUS est un synonyme déprécié... &lt;a href=&quot;https://dotclear.placeoweb.com/post/Deadlock-MySQL&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; Deadlock MySQL&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/Deadlock-MySQL#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/Deadlock-MySQL#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/599</wfw:commentRss>
              </item>
          <item>
        <title>group http user agent sql</title>
        <link>https://dotclear.placeoweb.com/post/group-http-user-agent-sql</link>
        <guid isPermaLink="false">urn:md5:b63f39e8193dd9989de4541f44bb22d0</guid>
        <pubDate>Thu, 15 Aug 2013 16:00:00 +0200</pubDate>
        <dc:creator>PlaceOweb</dc:creator>
                  <category>SQL</category>
                          <category>mysql</category>
                  <category>php</category>
                  <category>sql</category>
                <description>&lt;p&gt;MySQL statement to know distinct browser version previoulsy stored in a table from User-Agent header ($_SERVER['HTTP_USER_AGENT'] with PHP for example).&lt;/p&gt; &lt;p&gt;There is no real way to extract browser name and version from browser agent header. Inspired from this links, i propose my query suggest :

How should I deal with user agent parsing in logs? (statement with SQL Server)
Understanding user-agent strings Internet Explorer user-agent tokens : Version Platform Feature and Trident token
T-SQL Function:... &lt;a href=&quot;https://dotclear.placeoweb.com/post/group-http-user-agent-sql&quot;&gt;&lt;em&gt;Lire&lt;/em&gt; group http user agent sql&lt;/a&gt;&lt;/p&gt;
</description>
        
                  <comments>https://dotclear.placeoweb.com/post/group-http-user-agent-sql#comment-form</comments>
          <wfw:comment>https://dotclear.placeoweb.com/post/group-http-user-agent-sql#comment-form</wfw:comment>
          <wfw:commentRss>https://dotclear.placeoweb.com/feed/atom/comments/586</wfw:commentRss>
              </item>
      </channel>
</rss>
