{"id":264,"date":"2023-02-22T17:38:36","date_gmt":"2023-02-22T16:38:36","guid":{"rendered":"http:\/\/www.sepchat.com\/SC\/?p=264"},"modified":"2023-02-23T15:02:07","modified_gmt":"2023-02-23T14:02:07","slug":"sql-selection-du-premier-enregistrement","status":"publish","type":"post","link":"http:\/\/www.sepchat.com\/SC\/index.php\/2023\/02\/22\/sql-selection-du-premier-enregistrement\/","title":{"rendered":"SQL\u00a0&#8211; S\u00e9lection du premier enregistrement"},"content":{"rendered":"\n<p>Comment s\u00e9lectionner le premier enregistrement lorsque plusieurs correspondent aux crit\u00e8res de s\u00e9lection ? &nbsp;<\/p>\n\n\n\n<p>Il faut utiliser rrn() et une sous requ\u00eate&nbsp;<\/p>\n\n\n\n<p>Exemple :<\/p>\n\n\n\n<p>Dans le fichier PERSPHY,on veut afficher la premi\u00e8re personne dont le nom commence par S<\/p>\n\n\n\n<p>select * from PERSPHY where rrn(PERSPHY) = (select min(rrn(PERSPHY)) from PERSPHY where NOM like &lsquo;S%&rsquo;)<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized has-custom-border\"><a href=\"sql2\"><img decoding=\"async\" loading=\"lazy\" src=\"http:\/\/www.sepchat.com\/SC\/wp-content\/uploads\/2023\/02\/fleche-r-edited.png\" alt=\"\" class=\"wp-image-306\" width=\"57\" height=\"57\"\/><\/a><\/figure>\n\n\n\n<div class=\"wp-block-buttons is-layout-flex\">\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link wp-element-button\" style=\"border-radius:100px\">Cet article vous a \u00e9t\u00e9 utile ? N\u2019h\u00e9sitez pas \u00e0 le partager.<\/a><\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Comment s\u00e9lectionner le premier enregistrement lorsque plusieurs correspondent aux crit\u00e8res de s\u00e9lection ? &nbsp; Il faut utiliser rrn() et une sous requ\u00eate&nbsp; Exemple : Dans le fichier PERSPHY,on veut afficher la premi\u00e8re personne dont le nom commence par S select * from PERSPHY where rrn(PERSPHY) = (select min(rrn(PERSPHY)) from PERSPHY where NOM like &lsquo;S%&rsquo;)<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/264"}],"collection":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/comments?post=264"}],"version-history":[{"count":6,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/264\/revisions"}],"predecessor-version":[{"id":334,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/posts\/264\/revisions\/334"}],"wp:attachment":[{"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/media?parent=264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/categories?post=264"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sepchat.com\/SC\/index.php\/wp-json\/wp\/v2\/tags?post=264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}