Yahoo Poland Wyszukiwanie w Internecie

Search results

  1. 11 wrz 2012 · The following query gives the list of all the primary keys in the given database. SELECT DISTINCT TABLE_NAME ,column_name FROM INFORMATION_SCHEMA.key_column_usage WHERE TABLE_SCHEMA IN ('*your_db_name*');

  2. 19 maj 2011 · $result = mysql_query("SHOW FIELDS FROM $DATABASE.$TABLE_NAME"); $i = 0; while ($row = mysql_fetch_array($result)) { echo $row['Field'] . ' ' . $row['Type']; }

  3. 21 mar 2024 · Below are five ways to get the primary key column/s from an existing table in MySQL. The SHOW KEYS Statement. In MySQL we can use the SHOW KEYS statement to get the primary key for a given table: SHOW KEYS FROM Person WHERE Key_name = 'PRIMARY'; Example result:

  4. The mysqlshow client can be used to quickly see which databases exist, their tables, or a table's columns or indexes.. mysqlshow provides a command-line interface to several SQL SHOW statements. See Section 15.7.7, “SHOW Statements”.The same information can be obtained by using those statements directly. For example, you can issue them from the mysql client program.

  5. 10 paź 2019 · To get a list of the tables in a MySQL database, use the mysql client tool to connect to the MySQL server and run the SHOW TABLES command. Access the MySQL server: mysql -u user -p. From within the MySQL shell, switch to the database using the USE statement: USE database_name;

  6. 20 sty 2021 · Working With Tables in MySQL. Create a new table in a database with the specified column name and datatype: CREATE TABLE table_name (. column1 datatype, column2 datatype, column3 datatype, ); Display the table structure: DESCRIBE table_name.

  7. 10 mar 2024 · In this tutorial, we learned about using the MySQL command line. We learned about different ways we can connect to the MySQL shell and how we can connect to a particular database directly, how we can execute SQL script files and export the output to CSV files.