Mysql Code Samples



Filters


SQL | ALTER to change the name of the table
Reshma | 4 years, 9 months
ALTER TABLE TABLE_NAME RENAME TO NEW_TABLE_NAME;
alter table mysql
How to stop the PostgreSQL manually?
Reshma | 4 years, 8 months
show data_directory;   //To see the directory where the Postgresql data will be stored.

pg_ctl -D
manual stop postgresql mysql
How to delete SEQUENCE in postgresql
Reshma | 4 years, 7 months
drop sequence sequence_name;
sequence postgresql mysql
COUNT() Function
Reshma | 4 years, 9 months
SELECT COUNT(SALARY)
FROM EMPLOYEES
WHERE SALARY >= 40000;
This will fetch the information of all the employees whose salary either equals to 40,000 or is grea
count() mysql
How to copy data from one column to another column in the same table
Reshma | 4 years, 2 months
UPDATE TABLE_NAME SET NEW_COLUMN_NAME = EXISTING_COLUMN_NAME
mysql table copy data
how to invoke sequence while inserting new record into postgresql table?
Reshma | 4 years, 4 months
insert into biz_term(
  column1, 
  column2, 
invoking sequence mysql
How to print duplicate rows in a table
Reshma | 4 years, 8 months
SELECT column1, column2 FROM tbl
GROUP BY column1, column2
HAVING COUNT(*) > 1
duplicate rows mysql
How to Get the names of the table in SQL
Reshma | 4 years, 8 months
SELECT * FROM INFORMATION_SCHEMA.TABLES
table names mysql
How to get the postgresql name and port?
Reshma | 4 years, 4 months
SELECT *
FROM pg_settings
WHERE name = 'port';
mysql port and name
Prev