Search
 
SCRIPT & CODE EXAMPLE
 

SQL

truncate table

TRUNCATE TABLE table;
Comment

truncate all tables

SELECT Concat('TRUNCATE TABLE ',table_schema,'.',TABLE_NAME, ';') 
FROM INFORMATION_SCHEMA.TABLES where  table_schema in ('db1_name','db2_name');
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql login to a specific database terminal 
Sql :: date in oracle 
Sql :: distinct sql 
Sql :: reset auto increment mysql 
Sql :: SQL Server Altering Column to be Unique 
Sql :: mysql run sql file 
Sql :: mysql to uppercase 
Sql :: como consultar registros duplicados en mysql 
Sql :: how to set a column as unique in sql server 
Sql :: how to change column name in mysql 
Sql :: firebase query timestamp 
Sql :: commit in sql 
Sql :: create temp table in sql 
Sql :: how to remove unique key in mysql 
Sql :: sql select lowest value row 
Sql :: mysql select statement after index 
Sql :: postgres week number 
Sql :: select random rows sql 
Sql :: call postgres function 
Sql :: how insert auto increment 
Sql :: how to write lowercase in sql 
Sql :: create table with timestamp postgresql 
Sql :: sql oracle update multiple rows 
Sql :: sql server create database 
Sql :: oracle dynamic select into 
Sql :: convert columns to rows in sql server 
Sql :: select database in mysql 
Sql :: mysql run script 
Sql :: oracle select json_table example 
Sql :: postgre query date 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =