Cov txheej txheem:

Koj npe lub rooj hauv SQL li cas?
Koj npe lub rooj hauv SQL li cas?

Video: Koj npe lub rooj hauv SQL li cas?

Video: Koj npe lub rooj hauv SQL li cas?
Video: Kor Vang -Koj ntxhais hlob hu li cas ne? (Official MV) 16/9/2020 2024, Kaum ib hlis
Anonim

Ua ntej, right-click rau ntawm npe table thiab xaiv Rename cov ntawv qhia zaub mov: Thib ob, ntaus tus tshiab npe ntawm rooj Piv txwv li, product_archive thiab nias Enter: Hauv no nyeem, koj tau kawm yuav ua li cas hloov npe a rooj nyob rau hauv ib tug database siv sp_rename khaws cov txheej txheem thiab SQL ntawv Server Management Studio.

Ntawm no, ua li cas koj npe lub rooj hauv database?

Tshwj xeeb, kuv yuav piav qhia txog kev sau npe rau cov khoom siv database, vim li cas lawv tseem ceeb heev, thiab koj yuav tsum ua dab tsi thiab tsis ua

  1. Ceeb toom!
  2. Zam cov lus qhia.
  3. Tus lej qis.
  4. Hom ntaub ntawv tsis yog npe.
  5. Underscores cais cov lus.
  6. Tag nrho cov lus, tsis yog abbreviations.
  7. Siv cov ntawv luv luv.
  8. Zam cov lus tshwj tseg.

Ib tug kuj yuav nug, dab tsi yog lub naming convention siv rau SQL? Tsis muaj cov cim tshwj xeeb, cov qhab nia lossis qhov chaw yuav tsum yog siv . Indexs yuav nyob twj ywm npe raws li tus SQL ntawv Server default, tshwj tsis yog tias qhov ntsuas tau tsim yog rau lub hom phiaj tshwj xeeb. Txhua qhov chaw tseem ceeb thiab cov chaw tseem ceeb txawv teb chaws yuav raug ntsuas thiab muaj npe nyob rau hauv SQL ntawv Server default.

Ib sab saum toj no, kuv yuav nrhiav tau lub npe lub rooj hauv SQL li cas?

  1. MySQL hom syntax.
  2. SELECT table_name NTAWM information_schema.tables WHERE table_type = 'base table' THIAB table_schema = 'test';
  3. SQL Server.
  4. SIV xeem; // Xaiv DATABASE. SELECT table_name NTAWM information_schema.tables WHERE table_type = 'base table'
  5. Oracle.
  6. DB 2.
  7. PostgreSQL.

Kuv yuav sau cov npe kab hauv ib lub rooj hauv SQL li cas?

Ntsis Query kom tau tag nrho cov npe kab los ntawm cov lus database hauv SQL

  1. SELECT COLUMN_NAME.
  2. Los ntawm INFORMATION_SCHEMA. COLUMNS.
  3. WHERE TABLE_NAME = 'Koj Lub Npe'
  4. YUAV TSUM ORDINAL_POSITION.

Pom zoo: