Search
 
SCRIPT & CODE EXAMPLE
 

SQL

sql select random procentage from rows

-- for 10% -- 
SELECT * FROM table_name
	ORDER BY random() 
	LIMIT (SELECT (COUNT(*)*0.01)::INT FROM table_name);
Comment

PREVIOUS NEXT
Code Example
Sql :: delete in sql 
Sql :: sql fetch next 10 rows pdo 
Sql :: Find Last Fractal Function MQL4 
Sql :: SELECT multiple from database 
Sql :: query to fetch 50% records from the table. 
Sql :: what alter does in db 
Sql :: sql equal then arrow 
Sql :: create view in sql server that contain multiple select statements 
Sql :: mysql check if entry exists 
Sql :: split a database into related tables based on their structure in MySQL 
Sql :: unpdate pl sql 
Sql :: mysql grant execute 
Sql :: mysql pv progres 
Sql :: mysql – Error ‘Column count of mysql.user is wrong. Expected 45, found 43. The table is probably corrupted’ on query. 
Sql :: heavy table in mysql 
Sql :: mariadb select limit offset 
Sql :: oracle c# multiple update sql 
Sql :: amount to words oracle Function 
Sql :: sql implicit cursor 
Sql :: postgresql custom order by 
Sql :: Raw query must include the primary key 
Sql :: FILENAME /usr/bin/mysql does not exists. Make sure correct path is set in /etc/dump admin/settings.conf. 
Sql :: fetch second word from a string in ms sql 
Sql :: SQL Injection Using Always True Condition 
Sql :: create table with error 
Sql :: sql to linq converter online free 
Sql :: Join base on multiple and conditions 
Sql :: psql commande gset 
Sql :: umgebungsvariable setzen für mysql 8 
Sql :: date functions 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =