Search
 
SCRIPT & CODE EXAMPLE
 

SQL

MySql get primary keys of table

SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Your Database'
  AND TABLE_NAME = 'Your Table name'
  AND COLUMN_KEY = 'PRI';


SELECT COLUMN_NAME
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_SCHEMA = 'Your Database'
  AND TABLE_NAME = 'Your Table name'
  AND COLUMN_KEY = 'UNI';
Comment

PREVIOUS NEXT
Code Example
Sql :: mysql round 
Sql :: backup mysql data only 
Sql :: mysql time ago difference 
Sql :: copy sql table to new table 
Sql :: how to select all attributes from a row if there is a certain string in it MySQL 
Sql :: oracle ora-00054 causes 
Sql :: how to rename column in sql 
Sql :: display index in sql 
Sql :: sql server reseed identity column 
Sql :: ostgreSQL version 
Sql :: what is mysql_pconnect 
Sql :: sql current year 
Sql :: how to change column type psql 
Sql :: mysql parse int 
Sql :: how to change the value of a table in sql 
Sql :: oracle index partition 
Sql :: add foreign key constraint in postgresql 
Sql :: FirebaseException ([cloud_firestore/permission-denied] The caller does not have permission to execute the specified operation.) 
Sql :: grant access on table in oracle 
Sql :: Copy Table from SQL to CSV 
Sql :: blob datatype in mysql 
Sql :: mysql list users 
Sql :: sql delete caracter list 
Sql :: sqlite create table if not exists 
Sql :: how to fetch first 5 characters in sql 
Sql :: column get from sql table 
Sql :: SQLSTATE[IMSSP]: The active result for the query contains no fields. 
Sql :: sqlite to csv statement 
Sql :: count columns psql(PostreSQL) 
Sql :: psql get table data types 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =